home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 April: Mac OS SDK / Dev.CD Apr 99 SDK1.toast / Development Kits / Interfaces&Libraries / Universal / Interfaces / AIncludes / Sound.a < prev    next >
Encoding:
Text File  |  1998-08-17  |  75.1 KB  |  2,270 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        Sound.a
  3. ;
  4. ;    Contains:    Sound Manager Interfaces.
  5. ;
  6. ;    Version:    Technology:    Sound Manager 3.3
  7. ;                Release:    Universal Interfaces 3.2
  8. ;
  9. ;    Copyright:    © 1986-1998 by Apple Computer, Inc., all rights reserved
  10. ;
  11. ;    Bugs?:        For bug reports, consult the following page on
  12. ;                the World Wide Web:
  13. ;
  14. ;                    http://developer.apple.com/bugreporter/
  15. ;
  16. ;
  17.     IF &TYPE('__SOUND__') = 'UNDEFINED' THEN
  18. __SOUND__ SET 1
  19.  
  20.     IF &TYPE('__MACTYPES__') = 'UNDEFINED' THEN
  21.     include 'MacTypes.a'
  22.     ENDIF
  23.     IF &TYPE('__DIALOGS__') = 'UNDEFINED' THEN
  24.     include 'Dialogs.a'
  25.     ENDIF
  26.     IF &TYPE('__COMPONENTS__') = 'UNDEFINED' THEN
  27.     include 'Components.a'
  28.     ENDIF
  29.     IF &TYPE('__MIXEDMODE__') = 'UNDEFINED' THEN
  30.     include 'MixedMode.a'
  31.     ENDIF
  32.     IF &TYPE('__MOVIES__') = 'UNDEFINED' THEN
  33.     include 'Movies.a'
  34.     ENDIF
  35.  
  36. ;                        * * *  N O T E  * * *
  37. ;
  38. ;    This file has been updated to include Sound Manager 3.3 interfaces.
  39. ;
  40. ;    Some of the Sound Manager 3.0 interfaces were not put into the InterfaceLib
  41. ;    that originally shipped with the PowerMacs. These missing functions and the
  42. ;    new 3.3 interfaces have been released in the SoundLib library for PowerPC
  43. ;    developers to link with. The runtime library for these functions are
  44. ;    installed by the Sound Manager. The following functions are found in SoundLib.
  45. ;
  46. ;        GetCompressionInfo(), GetSoundPreference(), SetSoundPreference(),
  47. ;        UnsignedFixedMulDiv(), SndGetInfo(), SndSetInfo(), GetSoundOutputInfo(),
  48. ;        SetSoundOutputInfo(), GetCompressionName(), SoundConverterOpen(),
  49. ;        SoundConverterClose(), SoundConverterGetBufferSizes(), SoundConverterBeginConversion(),
  50. ;        SoundConverterConvertBuffer(), SoundConverterEndConversion(),
  51. ;        AudioGetBass(), AudioGetInfo(), AudioGetMute(), AudioGetOutputDevice(),
  52. ;        AudioGetTreble(), AudioGetVolume(), AudioMuteOnEvent(), AudioSetBass(),
  53. ;        AudioSetMute(), AudioSetToDefaults(), AudioSetTreble(), AudioSetVolume(),
  54. ;        OpenMixerSoundComponent(), CloseMixerSoundComponent(), SoundComponentAddSource(),
  55. ;        SoundComponentGetInfo(), SoundComponentGetSource(), SoundComponentGetSourceData(),
  56. ;        SoundComponentInitOutputDevice(), SoundComponentPauseSource(),
  57. ;        SoundComponentPlaySourceBuffer(), SoundComponentRemoveSource(),
  58. ;        SoundComponentSetInfo(), SoundComponentSetOutput(), SoundComponentSetSource(),
  59. ;        SoundComponentStartSource(), SoundComponentStopSource(),
  60. ;        ParseAIFFHeader(), ParseSndHeader(), SoundConverterGetInfo(), SoundConverterSetInfo()
  61. ;
  62.  
  63. ;    Interfaces for Sound Driver, !!! OBSOLETE and NOT SUPPORTED !!!
  64. ;
  65. ;    These items are no longer defined, but appear here so that someone
  66. ;    searching the interfaces might find them. If you are using one of these
  67. ;    items, you must change your code to support the Sound Manager.
  68. ;
  69. ;        swMode, ftMode, ffMode
  70. ;        FreeWave, FFSynthRec, Tone, SWSynthRec, Wave, FTSoundRec
  71. ;        SndCompletionProcPtr
  72. ;        StartSound, StopSound, SoundDone
  73. ;
  74.  
  75.  
  76. ;  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  77. ;   constants
  78. ;  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  79.  
  80.  
  81.  
  82. soundListRsrc                    EQU        'snd '                ;Resource type used by Sound Manager
  83.  
  84. kSimpleBeepID                    EQU        1                    ;reserved resource ID for Simple Beep
  85.  
  86. rate48khz                        EQU        $BB800000            ;48000.00000 in fixed-point
  87. rate44khz                        EQU        $AC440000            ;44100.00000 in fixed-point
  88. rate22050hz                        EQU        $56220000            ;22050.00000 in fixed-point
  89. rate22khz                        EQU        $56EE8BA3            ;22254.54545 in fixed-point
  90. rate11khz                        EQU        $2B7745D1            ;11127.27273 in fixed-point
  91. rate11025hz                        EQU        $2B110000            ;11025.00000 in fixed-point
  92.  
  93.                                                             ;synthesizer numbers for SndNewChannel
  94. squareWaveSynth                    EQU        1                    ;square wave synthesizer
  95. waveTableSynth                    EQU        3                    ;wave table synthesizer
  96. sampledSynth                    EQU        5                    ;sampled sound synthesizer
  97.                                                             ;old Sound Manager MACE synthesizer numbers
  98. MACE3snthID                        EQU        11
  99. MACE6snthID                        EQU        13
  100.  
  101. kMiddleC                        EQU        60                    ;MIDI note value for middle C
  102.  
  103. kNoVolume                        EQU        0                    ;setting for no sound volume
  104. kFullVolume                        EQU        $0100                ;1.0, setting for full hardware output volume
  105.  
  106. stdQLength                        EQU        128
  107.  
  108. dataOffsetFlag                    EQU        $8000
  109.  
  110. kUseOptionalOutputDevice        EQU        -1                    ;only for Sound Manager 3.0 or later
  111.  
  112. notCompressed                    EQU        0                    ;compression ID's
  113. fixedCompression                EQU        -1                    ;compression ID for fixed-sized compression
  114. variableCompression                EQU        -2                    ;compression ID for variable-sized compression
  115.  
  116. twoToOne                        EQU        1
  117. eightToThree                    EQU        2
  118. threeToOne                        EQU        3
  119. sixToOne                        EQU        4
  120. sixToOnePacketSize                EQU        8
  121. threeToOnePacketSize            EQU        16
  122.  
  123. stateBlockSize                    EQU        64
  124. leftOverBlockSize                EQU        32
  125.  
  126. firstSoundFormat                EQU        $0001                ;general sound format
  127. secondSoundFormat                EQU        $0002                ;special sampled sound format (HyperCard)
  128.  
  129. dbBufferReady                    EQU        $00000001            ;double buffer is filled
  130. dbLastBuffer                    EQU        $00000004            ;last double buffer to play
  131.  
  132. sysBeepDisable                    EQU        $0000                ;SysBeep() enable flags
  133. sysBeepEnable                    EQU        $01
  134. sysBeepSynchronous                EQU        $02                    ;if bit set, make alert sounds synchronous
  135.  
  136. unitTypeNoSelection                EQU        $FFFF                ;unitTypes for AudioSelection.unitType
  137. unitTypeSeconds                    EQU        $0000
  138. ; PPCAsm thinks “extSH” is a directive and therefore can't be a constant (?)
  139. ; But the 68k Asm needs to have these constants, so wrap them inside TARGET_CPU_68K
  140.     IF TARGET_CPU_68K THEN
  141.  
  142. stdSH                            EQU        $00                    ;Standard sound header encode value
  143. extSH                            EQU        $FF                    ;Extended sound header encode value
  144. cmpSH                            EQU        $FE                    ;Compressed sound header encode value
  145.     ENDIF    ; TARGET_CPU_68K
  146. ; command numbers for SndDoCommand and SndDoImmediate
  147.  
  148. nullCmd                            EQU        0
  149. initCmd                            EQU        1
  150. freeCmd                            EQU        2
  151. quietCmd                        EQU        3
  152. flushCmd                        EQU        4
  153. reInitCmd                        EQU        5
  154. waitCmd                            EQU        10
  155. pauseCmd                        EQU        11
  156. resumeCmd                        EQU        12
  157. callBackCmd                        EQU        13
  158. syncCmd                            EQU        14
  159. availableCmd                    EQU        24
  160. versionCmd                        EQU        25
  161. totalLoadCmd                    EQU        26
  162. loadCmd                            EQU        27
  163. freqDurationCmd                    EQU        40
  164. restCmd                            EQU        41
  165. freqCmd                            EQU        42
  166. ampCmd                            EQU        43
  167. timbreCmd                        EQU        44
  168. getAmpCmd                        EQU        45
  169. volumeCmd                        EQU        46                    ;sound manager 3.0 or later only
  170. getVolumeCmd                    EQU        47                    ;sound manager 3.0 or later only
  171. clockComponentCmd                EQU        50                    ;sound manager 3.2.1 or later only
  172. getClockComponentCmd            EQU        51                    ;sound manager 3.2.1 or later only
  173. scheduledSoundCmd                EQU        52                    ;sound manager 3.3 or later only
  174. linkSoundComponentsCmd            EQU        53                    ;sound manager 3.3 or later only
  175. waveTableCmd                    EQU        60
  176. phaseCmd                        EQU        61
  177. soundCmd                        EQU        80
  178. bufferCmd                        EQU        81
  179. rateCmd                            EQU        82
  180. continueCmd                        EQU        83
  181. doubleBufferCmd                    EQU        84
  182. getRateCmd                        EQU        85
  183. rateMultiplierCmd                EQU        86
  184. getRateMultiplierCmd            EQU        87
  185. sizeCmd                            EQU        90                    ;obsolete command
  186. convertCmd                        EQU        91                    ;obsolete MACE command
  187.     IF OLDROUTINENAMES THEN
  188. ; channel initialization parameters
  189.  
  190. waveInitChannelMask                EQU        $07
  191. waveInitChannel0                EQU        $04                    ;wave table only, Sound Manager 2.0 and earlier
  192. waveInitChannel1                EQU        $05                    ;wave table only, Sound Manager 2.0 and earlier
  193. waveInitChannel2                EQU        $06                    ;wave table only, Sound Manager 2.0 and earlier
  194. waveInitChannel3                EQU        $07                    ;wave table only, Sound Manager 2.0 and earlier
  195. initChan0                        EQU        $04                    ;obsolete spelling
  196. initChan1                        EQU        $05                    ;obsolete spelling
  197. initChan2                        EQU        $06                    ;obsolete spelling
  198. initChan3                        EQU        $07                    ;obsolete spelling
  199.  
  200. outsideCmpSH                    EQU        0                    ;obsolete MACE constant
  201. insideCmpSH                        EQU        1                    ;obsolete MACE constant
  202. aceSuccess                        EQU        0                    ;obsolete MACE constant
  203. aceMemFull                        EQU        1                    ;obsolete MACE constant
  204. aceNilBlock                        EQU        2                    ;obsolete MACE constant
  205. aceBadComp                        EQU        3                    ;obsolete MACE constant
  206. aceBadEncode                    EQU        4                    ;obsolete MACE constant
  207. aceBadDest                        EQU        5                    ;obsolete MACE constant
  208. aceBadCmd                        EQU        6                    ;obsolete MACE constant
  209.     ENDIF    ; OLDROUTINENAMES
  210.  
  211. initChanLeft                    EQU        $0002                ;left stereo channel
  212. initChanRight                    EQU        $0003                ;right stereo channel
  213. initNoInterp                    EQU        $0004                ;no linear interpolation
  214. initNoDrop                        EQU        $0008                ;no drop-sample conversion
  215. initMono                        EQU        $0080                ;monophonic channel
  216. initStereo                        EQU        $00C0                ;stereo channel
  217. initMACE3                        EQU        $0300                ;MACE 3:1
  218. initMACE6                        EQU        $0400                ;MACE 6:1
  219. initPanMask                        EQU        $0003                ;mask for right/left pan values
  220. initSRateMask                    EQU        $0030                ;mask for sample rate values
  221. initStereoMask                    EQU        $00C0                ;mask for mono/stereo values
  222. initCompMask                    EQU        $FF00                ;mask for compression IDs
  223. ; Get&Set Sound Information Selectors
  224.  
  225. siActiveChannels                EQU        'chac'                ;active channels
  226. siActiveLevels                    EQU        'lmac'                ;active meter levels
  227. siAGCOnOff                        EQU        'agc '                ;automatic gain control state
  228. siAsync                            EQU        'asyn'                ;asynchronous capability
  229. siAVDisplayBehavior                EQU        'avdb'
  230. siChannelAvailable                EQU        'chav'                ;number of channels available
  231. siCompressionAvailable            EQU        'cmav'                ;compression types available
  232. siCompressionChannels            EQU        'cpct'                ;compressor's number of channels
  233. siCompressionFactor                EQU        'cmfa'                ;current compression factor
  234. siCompressionHeader                EQU        'cmhd'                ;return compression header
  235. siCompressionNames                EQU        'cnam'                ;compression type names available
  236. siCompressionParams                EQU        'evaw'                ;compression parameters
  237. siCompressionSampleRate            EQU        'cprt'                ;compressor's sample rate
  238. siCompressionType                EQU        'comp'                ;current compression type
  239. siContinuous                    EQU        'cont'                ;continous recording
  240. siDecompressionParams            EQU        'wave'                ;decompression parameters
  241. siDeviceBufferInfo                EQU        'dbin'                ;size of interrupt buffer
  242. siDeviceConnected                EQU        'dcon'                ;input device connection status
  243. siDeviceIcon                    EQU        'icon'                ;input device icon
  244. siDeviceName                    EQU        'name'                ;input device name
  245. siHardwareBalance                EQU        'hbal'
  246. siHardwareBalanceSteps            EQU        'hbls'
  247. siHardwareBass                    EQU        'hbas'
  248. siHardwareBassSteps                EQU        'hbst'
  249. siHardwareBusy                    EQU        'hwbs'                ;sound hardware is in use
  250. siHardwareFormat                EQU        'hwfm'                ;get hardware format
  251. siHardwareMute                    EQU        'hmut'                ;mute state of all hardware
  252. siHardwareTreble                EQU        'htrb'
  253. siHardwareTrebleSteps            EQU        'hwts'
  254. siHardwareVolume                EQU        'hvol'                ;volume level of all hardware
  255. siHardwareVolumeSteps            EQU        'hstp'                ;number of volume steps for hardware
  256. siHeadphoneMute                    EQU        'pmut'                ;mute state of headphones
  257. siHeadphoneVolume                EQU        'pvol'                ;volume level of headphones
  258. siHeadphoneVolumeSteps            EQU        'hdst'                ;number of volume steps for headphones
  259. siInputAvailable                EQU        'inav'                ;input sources available
  260. siInputGain                        EQU        'gain'                ;input gain
  261. siInputSource                    EQU        'sour'                ;input source selector
  262. siInputSourceNames                EQU        'snam'                ;input source names
  263. siLevelMeterOnOff                EQU        'lmet'                ;level meter state
  264. siModemGain                        EQU        'mgai'                ;modem input gain
  265. siMonitorAvailable                EQU        'mnav'
  266. siMonitorSource                    EQU        'mons'
  267. siNumberChannels                EQU        'chan'                ;current number of channels
  268. siOptionsDialog                    EQU        'optd'                ;display options dialog
  269. siOSTypeInputSource                EQU        'inpt'                ;input source by OSType
  270. siOSTypeInputAvailable            EQU        'inav'                ;list of available input source OSTypes
  271. siPlayThruOnOff                    EQU        'plth'                ;playthrough state
  272. siPostMixerSoundComponent        EQU        'psmx'                ;install post-mixer effect
  273. siPreMixerSoundComponent        EQU        'prmx'                ;install pre-mixer effect
  274. siQuality                        EQU        'qual'                ;quality setting
  275. siRateMultiplier                EQU        'rmul'                ;throttle rate setting
  276. siRecordingQuality                EQU        'qual'                ;recording quality
  277. siSampleRate                    EQU        'srat'                ;current sample rate
  278. siSampleRateAvailable            EQU        'srav'                ;sample rates available
  279. siSampleSize                    EQU        'ssiz'                ;current sample size
  280. siSampleSizeAvailable            EQU        'ssav'                ;sample sizes available
  281. siSetupCDAudio                    EQU        'sucd'                ;setup sound hardware for CD audio
  282. siSetupModemAudio                EQU        'sumd'                ;setup sound hardware for modem audio
  283. siSlopeAndIntercept                EQU        'flap'                ;floating point variables for conversion
  284. siSoundClock                    EQU        'sclk'
  285. siUseThisSoundClock                EQU        'sclc'                ;sdev uses this to tell the mixer to use his sound clock
  286. siSpeakerMute                    EQU        'smut'                ;mute state of all built-in speaker
  287. siSpeakerVolume                    EQU        'svol'                ;volume level of built-in speaker
  288. siSSpCPULoadLimit                EQU        '3dll'
  289. siSSpLocalization                EQU        '3dif'
  290. siSSpSpeakerSetup                EQU        '3dst'
  291. siStereoInputGain                EQU        'sgai'                ;stereo input gain
  292. siSubwooferMute                    EQU        'bmut'                ;mute state of sub-woofer
  293. siTwosComplementOnOff            EQU        'twos'                ;two's complement state
  294. siVolume                        EQU        'volu'                ;volume level of source
  295. siVoxRecordInfo                    EQU        'voxr'                ;VOX record parameters
  296. siVoxStopInfo                    EQU        'voxs'                ;VOX stop parameters
  297. siWideStereo                    EQU        'wide'                ;wide stereo setting
  298.  
  299. siCloseDriver                    EQU        'clos'                ;reserved for internal use only
  300. siInitializeDriver                EQU        'init'                ;reserved for internal use only
  301. siPauseRecording                EQU        'paus'                ;reserved for internal use only
  302. siUserInterruptProc                EQU        'user'                ;reserved for internal use only
  303. ;  input source Types
  304.  
  305. kInvalidSource                    EQU        $FFFFFFFF            ;this source may be returned from GetInfo if no other source is the monitored source
  306. kNoSource                        EQU        'none'                ;no source selection
  307. kCDSource                        EQU        'cd  '                ;internal CD player input
  308. kExtMicSource                    EQU        'emic'                ;external mic input
  309. kSoundInSource                    EQU        'sinj'                ;sound input jack
  310. kRCAInSource                    EQU        'irca'                ;RCA jack input
  311. kTVFMTunerSource                EQU        'tvfm'
  312. kDAVInSource                    EQU        'idav'                ;DAV analog input
  313. kIntMicSource                    EQU        'imic'                ;internal mic input
  314. kMediaBaySource                    EQU        'mbay'                ;media bay input
  315. kModemSource                    EQU        'modm'                ;modem input (internal modem on desktops, PCI input on PowerBooks)
  316. kPCCardSource                    EQU        'pcm '                ;PC Card pwm input
  317. kZoomVideoSource                EQU        'zvpc'                ;zoom video input
  318. kDVDSource                        EQU        'dvda'                ;DVD audio input
  319. ; Sound Component Types and Subtypes
  320.  
  321. kNoSoundComponentType            EQU        '****'
  322. kSoundComponentType                EQU        'sift'                ;component type
  323. kSoundComponentPPCType            EQU        'nift'                ;component type for PowerPC code
  324. kRate8SubType                    EQU        'ratb'                ;8-bit rate converter
  325. kRate16SubType                    EQU        'ratw'                ;16-bit rate converter
  326. kConverterSubType                EQU        'conv'                ;sample format converter
  327. kSndSourceSubType                EQU        'sour'                ;generic source component
  328. kMixerType                        EQU        'mixr'
  329. kMixer8SubType                    EQU        'mixb'                ;8-bit mixer
  330. kMixer16SubType                    EQU        'mixw'                ;16-bit mixer
  331. kSoundInputDeviceType            EQU        'sinp'                ;sound input component
  332. kWaveInSubType                    EQU        'wavi'                ;Windows Wave
  333. kSoundOutputDeviceType            EQU        'sdev'                ;sound output component
  334. kClassicSubType                    EQU        'clas'                ;classic hardware, i.e. Mac Plus
  335. kASCSubType                        EQU        'asc '                ;Apple Sound Chip device
  336. kDSPSubType                        EQU        'dsp '                ;DSP device
  337. kAwacsSubType                    EQU        'awac'                ;Another of Will's Audio Chips device
  338. kGCAwacsSubType                    EQU        'awgc'                ;Awacs audio with Grand Central DMA
  339. kSingerSubType                    EQU        'sing'                ;Singer (via Whitney) based sound
  340. kSinger2SubType                    EQU        'sng2'                ;Singer 2 (via Whitney) for Acme
  341. kWhitSubType                    EQU        'whit'                ;Whit sound component for PrimeTime 3
  342. kSoundBlasterSubType            EQU        'sbls'                ;Sound Blaster for CHRP
  343. kWaveOutSubType                    EQU        'wavo'                ;Windows Wave
  344. kDirectSoundSubType                EQU        'dsnd'                ;Direct Sound
  345. kUNIXsdevSubType                EQU        'un1x'                ;UNIX base sdev
  346. kSoundCompressor                EQU        'scom'
  347. kSoundDecompressor                EQU        'sdec'
  348. kAudioComponentType                EQU        'adio'                ;Audio components and sub-types
  349. kAwacsPhoneSubType                EQU        'hphn'
  350. kAudioVisionSpeakerSubType        EQU        'telc'
  351. kAudioVisionHeadphoneSubType    EQU        'telh'
  352. kPhilipsFaderSubType            EQU        'tvav'
  353. kSGSToneSubType                    EQU        'sgs0'
  354. kSoundEffectsType                EQU        'snfx'                ;sound effects type
  355. kSSpLocalizationSubType            EQU        'snd3'
  356. ; Format Types
  357.  
  358. kSoundNotCompressed                EQU        'NONE'                ;sound is not compressed
  359. k8BitOffsetBinaryFormat            EQU        'raw '                ;8-bit offset binary
  360. k16BitBigEndianFormat            EQU        'twos'                ;16-bit big endian
  361. k16BitLittleEndianFormat        EQU        'sowt'                ;16-bit little endian
  362. kFloat32Format                    EQU        'fl32'                ;32-bit floating point
  363. kFloat64Format                    EQU        'fl64'                ;64-bit floating point
  364. k24BitFormat                    EQU        'in24'                ;24-bit integer
  365. k32BitFormat                    EQU        'in32'                ;32-bit integer
  366. kMACE3Compression                EQU        'MAC3'                ;MACE 3:1
  367. kMACE6Compression                EQU        'MAC6'                ;MACE 6:1
  368. kCDXA4Compression                EQU        'cdx4'                ;CD/XA 4:1
  369. kCDXA2Compression                EQU        'cdx2'                ;CD/XA 2:1
  370. kIMACompression                    EQU        'ima4'                ;IMA 4:1
  371. kULawCompression                EQU        'ulaw'                ;µLaw 2:1
  372. kALawCompression                EQU        'alaw'                ;aLaw 2:1
  373. kMicrosoftADPCMFormat            EQU        $6D730002            ;Microsoft ADPCM - ACM code 2
  374. kDVIIntelIMAFormat                EQU        $6D730011            ;DVI/Intel IMA ADPCM - ACM code 17
  375. kDVAudioFormat                    EQU        'dvca'                ;DV Audio
  376. kQDesignCompression                EQU        'QDMC'                ;QDesign music
  377. kQUALCOMMCompression            EQU        'Qclp'                ;QUALCOMM PureVoice
  378. kOffsetBinary                    EQU        'raw '                ;for compatibility
  379. kTwosComplement                    EQU        'twos'                ;for compatibility
  380. kLittleEndianFormat                EQU        'sowt'                ;for compatibility
  381.     IF TARGET_RT_LITTLE_ENDIAN THEN
  382.  
  383. k16BitNativeEndianFormat        EQU        'sowt'
  384. k16BitNonNativeEndianFormat        EQU        'twos'
  385.     ELSE
  386.  
  387. k16BitNativeEndianFormat        EQU        'twos'
  388. k16BitNonNativeEndianFormat        EQU        'sowt'
  389.     ENDIF    ; TARGET_RT_LITTLE_ENDIAN
  390. ; Features Flags
  391.  
  392. k8BitRawIn                        EQU        $01                    ;data description
  393. k8BitTwosIn                        EQU        $02
  394. k16BitIn                        EQU        $04
  395. kStereoIn                        EQU        $08
  396. k8BitRawOut                        EQU        $0100
  397. k8BitTwosOut                    EQU        $0200
  398. k16BitOut                        EQU        $0400
  399. kStereoOut                        EQU        $0800
  400. kReverse                        EQU        $00010000            ;  function description
  401. kRateConvert                    EQU        $00020000
  402. kCreateSoundSource                EQU        $00040000
  403. kHighQuality                    EQU        $00400000            ;  performance description
  404. kNonRealTime                    EQU        $00800000
  405. ; SoundComponentPlaySourceBuffer action flags
  406.  
  407. kSourcePaused                    EQU        $01
  408. kPassThrough                    EQU        $00010000
  409. kNoSoundComponentChain            EQU        $00020000
  410. ; SoundParamBlock flags, usefull for OpenMixerSoundComponent
  411.  
  412. kNoMixing                        EQU        $01                    ;don't mix source
  413. kNoSampleRateConversion            EQU        $02                    ;don't convert sample rate (i.e. 11 kHz -> 22 kHz)
  414. kNoSampleSizeConversion            EQU        $04                    ;don't convert sample size (i.e. 16 -> 8)
  415. kNoSampleFormatConversion        EQU        $08                    ;don't convert sample format (i.e. 'twos' -> 'raw ')
  416. kNoChannelConversion            EQU        $10                    ;don't convert stereo/mono
  417. kNoDecompression                EQU        $20                    ;don't decompress (i.e. 'MAC3' -> 'raw ')
  418. kNoVolumeConversion                EQU        $40                    ;don't apply volume
  419. kNoRealtimeProcessing            EQU        $80                    ;won't run at interrupt time
  420. kScheduledSource                EQU        $0100                ;source is scheduled
  421. ; SoundParamBlock quality settings
  422.  
  423. kBestQuality                    EQU        $01                    ;use interpolation in rate conversion
  424. ; useful bit masks
  425.  
  426. kInputMask                        EQU        $000000FF            ;masks off input bits
  427. kOutputMask                        EQU        $0000FF00            ;masks off output bits
  428. kOutputShift                    EQU        8                    ;amount output bits are shifted
  429. kActionMask                        EQU        $00FF0000            ;masks off action bits
  430. kSoundComponentBits                EQU        $00FFFFFF
  431. ; audio atom types
  432.  
  433. kAudioFormatAtomType            EQU        'frma'
  434. kAudioEndianAtomType            EQU        'enda'
  435. kAudioTerminatorAtomType        EQU        0
  436. ; siAVDisplayBehavior types
  437.  
  438. kAVDisplayHeadphoneRemove        EQU        0                    ; monitor does not have a headphone attached
  439. kAVDisplayHeadphoneInsert        EQU        1                    ; monitor has a headphone attached
  440. kAVDisplayPlainTalkRemove        EQU        2                    ; monitor either sending no input through CPU input port or unable to tell if input is coming in
  441. kAVDisplayPlainTalkInsert        EQU        3                    ; monitor sending PlainTalk level microphone source input through sound input port
  442. ; Audio Component constants
  443.  
  444.                                                             ;Values for whichChannel parameter
  445. audioAllChannels                EQU        0                    ;All channels (usually interpreted as both left and right)
  446. audioLeftChannel                EQU        1                    ;Left channel
  447. audioRightChannel                EQU        2                    ;Right channel
  448.                                                             ;Values for mute parameter
  449. audioUnmuted                    EQU        0                    ;Device is unmuted
  450. audioMuted                        EQU        1                    ;Device is muted
  451.                                                             ;Capabilities flags definitions
  452. audioDoesMono                    EQU        $00000001            ;Device supports mono output
  453. audioDoesStereo                    EQU        $00000002            ;Device supports stereo output
  454. audioDoesIndependentChannels    EQU        $00000004            ;Device supports independent software control of each channel
  455. ; Sound Input Qualities
  456.  
  457. siCDQuality                        EQU        'cd  '                ;44.1kHz, stereo, 16 bit
  458. siBestQuality                    EQU        'best'                ;22kHz, mono, 8 bit
  459. siBetterQuality                    EQU        'betr'                ;22kHz, mono, MACE 3:1
  460. siGoodQuality                    EQU        'good'                ;22kHz, mono, MACE 6:1
  461. siNoneQuality                    EQU        'none'                ;settings don't match any quality for a get call
  462.  
  463. siDeviceIsConnected                EQU        1                    ;input device is connected and ready for input
  464. siDeviceNotConnected            EQU        0                    ;input device is not connected
  465. siDontKnowIfConnected            EQU        -1                    ;can't tell if input device is connected
  466. siReadPermission                EQU        0                    ;permission passed to SPBOpenDevice
  467. siWritePermission                EQU        1                    ;permission passed to SPBOpenDevice
  468.  
  469. ;  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  470. ;   typedefs
  471. ;  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  472.  
  473.  
  474.  
  475. SndCommand                RECORD 0
  476. cmd                         ds.w    1                ; offset: $0 (0)
  477. param1                     ds.w    1                ; offset: $2 (2)
  478. param2                     ds.l    1                ; offset: $4 (4)
  479. sizeof                     EQU *                    ; size:   $8 (8)
  480.                         ENDR
  481.  
  482.  
  483. ; typedef SndChannel *                    SndChannelPtr
  484.  
  485. SndChannel                RECORD 0
  486. nextChan                 ds.l    1                ; offset: $0 (0)
  487. firstMod                 ds.l    1                ; offset: $4 (4)        ;  reserved for the Sound Manager 
  488. callBack                 ds.l    1                ; offset: $8 (8)
  489. userInfo                 ds.l    1                ; offset: $C (12)
  490. wait                     ds.l    1                ; offset: $10 (16)        ;  The following is for internal Sound Manager use only.
  491. cmdInProgress             ds        SndCommand        ; offset: $14 (20)
  492. flags                     ds.w    1                ; offset: $1C (28)
  493. qLength                     ds.w    1                ; offset: $1E (30)
  494. qHead                     ds.w    1                ; offset: $20 (32)
  495. qTail                     ds.w    1                ; offset: $22 (34)
  496. queue                     ds.b    128 * SndCommand.sizeof ; offset: $24 (36)
  497. sizeof                     EQU *                    ; size:   $424 (1060)
  498.                         ENDR
  499. ; MACE structures
  500. StateBlock                RECORD 0
  501. stateVar                 ds.w    64                ; offset: $0 (0)
  502. sizeof                     EQU *                    ; size:   $80 (128)
  503.                         ENDR
  504. ; typedef struct StateBlock *            StateBlockPtr
  505.  
  506. LeftOverBlock            RECORD 0
  507. count                     ds.l    1                ; offset: $0 (0)
  508. sampleArea                 ds.b    32                ; offset: $4 (4)
  509. sizeof                     EQU *                    ; size:   $24 (36)
  510.                         ENDR
  511. ; typedef struct LeftOverBlock *        LeftOverBlockPtr
  512.  
  513. ModRef                    RECORD 0
  514. modNumber                 ds.w    1                ; offset: $0 (0)
  515. modInit                     ds.l    1                ; offset: $2 (2)
  516. sizeof                     EQU *                    ; size:   $6 (6)
  517.                         ENDR
  518. SndListResource            RECORD 0
  519. format                     ds.w    1                ; offset: $0 (0)
  520. numModifiers             ds.w    1                ; offset: $2 (2)
  521. modifierPart             ds        ModRef            ; offset: $4 (4) <-- really an array of length one
  522. numCommands                 ds.w    1                ; offset: $A (10)
  523. commandPart                 ds        SndCommand        ; offset: $C (12) <-- really an array of length one
  524. dataPart                 ds.b    1                ; offset: $14 (20) <-- really an array of length one
  525.                          ORG 22
  526. sizeof                     EQU *                    ; size:   $16 (22)
  527.                         ENDR
  528. ; typedef struct SndListResource *        SndListPtr
  529.  
  530. ; typedef SndListPtr *                    SndListHandle
  531.  
  532. ; typedef SndListHandle                 SndListHndl
  533.  
  534. ; HyperCard sound resource format
  535. Snd2ListResource        RECORD 0
  536. format                     ds.w    1                ; offset: $0 (0)
  537. refCount                 ds.w    1                ; offset: $2 (2)
  538. numCommands                 ds.w    1                ; offset: $4 (4)
  539. commandPart                 ds        SndCommand        ; offset: $6 (6) <-- really an array of length one
  540. dataPart                 ds.b    1                ; offset: $E (14) <-- really an array of length one
  541.                          ORG 16
  542. sizeof                     EQU *                    ; size:   $10 (16)
  543.                         ENDR
  544. ; typedef struct Snd2ListResource *        Snd2ListPtr
  545.  
  546. ; typedef Snd2ListPtr *                    Snd2ListHandle
  547.  
  548. ; typedef Snd2ListHandle                 Snd2ListHndl
  549.  
  550. SoundHeader                RECORD 0
  551. samplePtr                 ds.l    1                ; offset: $0 (0)        ; if NIL then samples are in sampleArea
  552. length                     ds.l    1                ; offset: $4 (4)        ; length of sound in bytes
  553. sampleRate                 ds.l    1                ; offset: $8 (8)        ; sample rate for this sound
  554. loopStart                 ds.l    1                ; offset: $C (12)        ; start of looping portion
  555. loopEnd                     ds.l    1                ; offset: $10 (16)        ; end of looping portion
  556. encode                     ds.b    1                ; offset: $14 (20)        ; header encoding
  557. baseFrequency             ds.b    1                ; offset: $15 (21)        ; baseFrequency value
  558. sampleArea                 ds.b    1                ; offset: $16 (22) <-- really an array of length one ; space for when samples follow directly
  559.                          ORG 24
  560. sizeof                     EQU *                    ; size:   $18 (24)
  561.                         ENDR
  562. ; typedef struct SoundHeader *            SoundHeaderPtr
  563.  
  564. CmpSoundHeader            RECORD 0
  565. samplePtr                 ds.l    1                ; offset: $0 (0)        ; if nil then samples are in sample area
  566. numChannels                 ds.l    1                ; offset: $4 (4)        ; number of channels i.e. mono = 1
  567. sampleRate                 ds.l    1                ; offset: $8 (8)        ; sample rate in Apples Fixed point representation
  568. loopStart                 ds.l    1                ; offset: $C (12)        ; loopStart of sound before compression
  569. loopEnd                     ds.l    1                ; offset: $10 (16)        ; loopEnd of sound before compression
  570. encode                     ds.b    1                ; offset: $14 (20)        ; data structure used , stdSH, extSH, or cmpSH
  571. baseFrequency             ds.b    1                ; offset: $15 (21)        ; same meaning as regular SoundHeader
  572. numFrames                 ds.l    1                ; offset: $16 (22)        ; length in frames ( packetFrames or sampleFrames )
  573. AIFFSampleRate             ds        extended80        ; offset: $1A (26)        ; IEEE sample rate
  574. markerChunk                 ds.l    1                ; offset: $24 (36)        ; sync track
  575. format                     ds.l    1                ; offset: $28 (40)        ; data format type, was futureUse1
  576. futureUse2                 ds.l    1                ; offset: $2C (44)        ; reserved by Apple
  577. stateVars                 ds.l    1                ; offset: $30 (48)        ; pointer to State Block
  578. leftOverSamples             ds.l    1                ; offset: $34 (52)        ; used to save truncated samples between compression calls
  579. compressionID             ds.w    1                ; offset: $38 (56)        ; 0 means no compression, non zero means compressionID
  580. packetSize                 ds.w    1                ; offset: $3A (58)        ; number of bits in compressed sample packet
  581. snthID                     ds.w    1                ; offset: $3C (60)        ; resource ID of Sound Manager snth that contains NRT C/E
  582. sampleSize                 ds.w    1                ; offset: $3E (62)        ; number of bits in non-compressed sample
  583. sampleArea                 ds.b    1                ; offset: $40 (64) <-- really an array of length one ; space for when samples follow directly
  584.                          ORG 66
  585. sizeof                     EQU *                    ; size:   $42 (66)
  586.                         ENDR
  587. ; typedef struct CmpSoundHeader *        CmpSoundHeaderPtr
  588.  
  589. ExtSoundHeader            RECORD 0
  590. samplePtr                 ds.l    1                ; offset: $0 (0)        ; if nil then samples are in sample area
  591. numChannels                 ds.l    1                ; offset: $4 (4)        ; number of channels,  ie mono = 1
  592. sampleRate                 ds.l    1                ; offset: $8 (8)        ; sample rate in Apples Fixed point representation
  593. loopStart                 ds.l    1                ; offset: $C (12)        ; same meaning as regular SoundHeader
  594. loopEnd                     ds.l    1                ; offset: $10 (16)        ; same meaning as regular SoundHeader
  595. encode                     ds.b    1                ; offset: $14 (20)        ; data structure used , stdSH, extSH, or cmpSH
  596. baseFrequency             ds.b    1                ; offset: $15 (21)        ; same meaning as regular SoundHeader
  597. numFrames                 ds.l    1                ; offset: $16 (22)        ; length in total number of frames
  598. AIFFSampleRate             ds        extended80        ; offset: $1A (26)        ; IEEE sample rate
  599. markerChunk                 ds.l    1                ; offset: $24 (36)        ; sync track
  600. instrumentChunks         ds.l    1                ; offset: $28 (40)        ; AIFF instrument chunks
  601. AESRecording             ds.l    1                ; offset: $2C (44)
  602. sampleSize                 ds.w    1                ; offset: $30 (48)        ; number of bits in sample
  603. futureUse1                 ds.w    1                ; offset: $32 (50)        ; reserved by Apple
  604. futureUse2                 ds.l    1                ; offset: $34 (52)        ; reserved by Apple
  605. futureUse3                 ds.l    1                ; offset: $38 (56)        ; reserved by Apple
  606. futureUse4                 ds.l    1                ; offset: $3C (60)        ; reserved by Apple
  607. sampleArea                 ds.b    1                ; offset: $40 (64) <-- really an array of length one ; space for when samples follow directly
  608.                          ORG 66
  609. sizeof                     EQU *                    ; size:   $42 (66)
  610.                         ENDR
  611. ; typedef struct ExtSoundHeader *        ExtSoundHeaderPtr
  612.  
  613. SoundHeaderUnion        RECORD 0
  614. stdHeader                 ds        SoundHeader        ; offset: $0 (0)
  615.                          ORG 0
  616. cmpHeader                 ds        CmpSoundHeader ; offset: $0 (0)
  617.                          ORG 0
  618. extHeader                 ds        ExtSoundHeader ; offset: $0 (0)
  619. sizeof                     EQU *                    ; size:   $42 (66)
  620.                         ENDR
  621. ConversionBlock            RECORD 0
  622. destination                 ds.w    1                ; offset: $0 (0)
  623. unused                     ds.w    1                ; offset: $2 (2)
  624. inputPtr                 ds.l    1                ; offset: $4 (4)
  625. outputPtr                 ds.l    1                ; offset: $8 (8)
  626. sizeof                     EQU *                    ; size:   $C (12)
  627.                         ENDR
  628. ; typedef struct ConversionBlock *        ConversionBlockPtr
  629.  
  630. ;  ScheduledSoundHeader flags
  631.  
  632. kScheduledSoundDoScheduled        EQU        $01
  633. kScheduledSoundDoCallBack        EQU        $02
  634. ScheduledSoundHeader    RECORD 0
  635. u                         ds        SoundHeaderUnion ; offset: $0 (0)
  636. flags                     ds.l    1                ; offset: $42 (66)
  637. reserved                 ds.w    1                ; offset: $46 (70)
  638. callBackParam1             ds.w    1                ; offset: $48 (72)
  639. callBackParam2             ds.l    1                ; offset: $4A (74)
  640. startTime                 ds        TimeRecord        ; offset: $4E (78)
  641. sizeof                     EQU *                    ; size:   $5E (94)
  642.                         ENDR
  643. ; typedef struct ScheduledSoundHeader *    ScheduledSoundHeaderPtr
  644.  
  645. SMStatus                RECORD 0
  646. smMaxCPULoad             ds.w    1                ; offset: $0 (0)
  647. smNumChannels             ds.w    1                ; offset: $2 (2)
  648. smCurCPULoad             ds.w    1                ; offset: $4 (4)
  649. sizeof                     EQU *                    ; size:   $6 (6)
  650.                         ENDR
  651. ; typedef struct SMStatus *                SMStatusPtr
  652.  
  653. SCStatus                RECORD 0
  654. scStartTime                 ds.l    1                ; offset: $0 (0)
  655. scEndTime                 ds.l    1                ; offset: $4 (4)
  656. scCurrentTime             ds.l    1                ; offset: $8 (8)
  657. scChannelBusy             ds.b    1                ; offset: $C (12)
  658. scChannelDisposed         ds.b    1                ; offset: $D (13)
  659. scChannelPaused             ds.b    1                ; offset: $E (14)
  660. scUnused                 ds.b    1                ; offset: $F (15)
  661. scChannelAttributes         ds.l    1                ; offset: $10 (16)
  662. scCPULoad                 ds.l    1                ; offset: $14 (20)
  663. sizeof                     EQU *                    ; size:   $18 (24)
  664.                         ENDR
  665. ; typedef struct SCStatus *                SCStatusPtr
  666.  
  667. AudioSelection            RECORD 0
  668. unitType                 ds.l    1                ; offset: $0 (0)
  669. selStart                 ds.l    1                ; offset: $4 (4)
  670. selEnd                     ds.l    1                ; offset: $8 (8)
  671. sizeof                     EQU *                    ; size:   $C (12)
  672.                         ENDR
  673. ; typedef struct AudioSelection *        AudioSelectionPtr
  674.  
  675. SndDoubleBuffer            RECORD 0
  676. dbNumFrames                 ds.l    1                ; offset: $0 (0)
  677. dbFlags                     ds.l    1                ; offset: $4 (4)
  678. dbUserInfo                 ds.l    2                ; offset: $8 (8)
  679. dbSoundData                 ds.b    1                ; offset: $10 (16) <-- really an array of length one
  680.                          ORG 18
  681. sizeof                     EQU *                    ; size:   $12 (18)
  682.                         ENDR
  683. ; typedef struct SndDoubleBuffer *        SndDoubleBufferPtr
  684.  
  685. SndDoubleBufferHeader    RECORD 0
  686. dbhNumChannels             ds.w    1                ; offset: $0 (0)
  687. dbhSampleSize             ds.w    1                ; offset: $2 (2)
  688. dbhCompressionID         ds.w    1                ; offset: $4 (4)
  689. dbhPacketSize             ds.w    1                ; offset: $6 (6)
  690. dbhSampleRate             ds.l    1                ; offset: $8 (8)
  691. dbhBufferPtr             ds.l    2                ; offset: $C (12)
  692. dbhDoubleBack             ds.l    1                ; offset: $14 (20)
  693. sizeof                     EQU *                    ; size:   $18 (24)
  694.                         ENDR
  695. ; typedef struct SndDoubleBufferHeader * SndDoubleBufferHeaderPtr
  696.  
  697. SndDoubleBufferHeader2    RECORD 0
  698. dbhNumChannels             ds.w    1                ; offset: $0 (0)
  699. dbhSampleSize             ds.w    1                ; offset: $2 (2)
  700. dbhCompressionID         ds.w    1                ; offset: $4 (4)
  701. dbhPacketSize             ds.w    1                ; offset: $6 (6)
  702. dbhSampleRate             ds.l    1                ; offset: $8 (8)
  703. dbhBufferPtr             ds.l    2                ; offset: $C (12)
  704. dbhDoubleBack             ds.l    1                ; offset: $14 (20)
  705. dbhFormat                 ds.l    1                ; offset: $18 (24)
  706. sizeof                     EQU *                    ; size:   $1C (28)
  707.                         ENDR
  708. ; typedef struct SndDoubleBufferHeader2 * SndDoubleBufferHeader2Ptr
  709.  
  710. SoundInfoList            RECORD 0
  711. count                     ds.w    1                ; offset: $0 (0)
  712. infoHandle                 ds.l    1                ; offset: $2 (2)
  713. sizeof                     EQU *                    ; size:   $6 (6)
  714.                         ENDR
  715. ; typedef struct SoundInfoList *        SoundInfoListPtr
  716.  
  717. SoundComponentData        RECORD 0
  718. flags                     ds.l    1                ; offset: $0 (0)
  719. format                     ds.l    1                ; offset: $4 (4)
  720. numChannels                 ds.w    1                ; offset: $8 (8)
  721. sampleSize                 ds.w    1                ; offset: $A (10)
  722. sampleRate                 ds.l    1                ; offset: $C (12)
  723. sampleCount                 ds.l    1                ; offset: $10 (16)
  724. buffer                     ds.l    1                ; offset: $14 (20)
  725. reserved                 ds.l    1                ; offset: $18 (24)
  726. sizeof                     EQU *                    ; size:   $1C (28)
  727.                         ENDR
  728. ; typedef struct SoundComponentData *    SoundComponentDataPtr
  729.  
  730.  
  731.  
  732. ; typedef SoundParamBlock *                SoundParamBlockPtr
  733.  
  734. SoundParamBlock            RECORD 0
  735. recordSize                 ds.l    1                ; offset: $0 (0)        ; size of this record in bytes
  736. desc                     ds        SoundComponentData ; offset: $4 (4)        ; description of sound buffer
  737. rateMultiplier             ds.l    1                ; offset: $20 (32)        ; rate multiplier to apply to sound
  738. leftVolume                 ds.w    1                ; offset: $24 (36)        ; volumes to apply to sound
  739. rightVolume                 ds.w    1                ; offset: $26 (38)
  740. quality                     ds.l    1                ; offset: $28 (40)        ; quality to apply to sound
  741. filter                     ds.l    1                ; offset: $2C (44)        ; filter to apply to sound
  742. moreRtn                     ds.l    1                ; offset: $30 (48)        ; routine to call to get more data
  743. completionRtn             ds.l    1                ; offset: $34 (52)        ; routine to call when buffer is complete
  744. refCon                     ds.l    1                ; offset: $38 (56)        ; user refcon
  745. result                     ds.w    1                ; offset: $3C (60)        ; result
  746. sizeof                     EQU *                    ; size:   $3E (62)
  747.                         ENDR
  748. CompressionInfo            RECORD 0
  749. recordSize                 ds.l    1                ; offset: $0 (0)
  750. format                     ds.l    1                ; offset: $4 (4)
  751. compressionID             ds.w    1                ; offset: $8 (8)
  752. samplesPerPacket         ds.w    1                ; offset: $A (10)
  753. bytesPerPacket             ds.w    1                ; offset: $C (12)
  754. bytesPerFrame             ds.w    1                ; offset: $E (14)
  755. bytesPerSample             ds.w    1                ; offset: $10 (16)
  756. futureUse1                 ds.w    1                ; offset: $12 (18)
  757. sizeof                     EQU *                    ; size:   $14 (20)
  758.                         ENDR
  759. ; typedef struct CompressionInfo *        CompressionInfoPtr
  760.  
  761. ; typedef CompressionInfoPtr *            CompressionInfoHandle
  762.  
  763. ; variables for floating point conversion
  764. SoundSlopeAndInterceptRecord RECORD 0
  765. slope                     ds        Float64            ; offset: $0 (0)
  766. intercept                 ds        Float64            ; offset: $8 (8)
  767. minClip                     ds        Float64            ; offset: $10 (16)
  768. maxClip                     ds        Float64            ; offset: $18 (24)
  769. sizeof                     EQU *                    ; size:   $20 (32)
  770.                         ENDR
  771. ; typedef struct SoundSlopeAndInterceptRecord * SoundSlopeAndInterceptPtr
  772.  
  773. ; private thing to use as a reference to a Sound Converter
  774.  
  775.  
  776. ; private thing to use as a reference to a Sound Source
  777.  
  778.  
  779. ; typedef SoundSource *                    SoundSourcePtr
  780.  
  781. SoundComponentLink        RECORD 0
  782. description                 ds        ComponentDescription ; offset: $0 (0)    ; Describes the sound component
  783. mixerID                     ds.l    1                ; offset: $14 (20)        ; Reserved by Apple
  784. linkID                     ds.l    1                ; offset: $18 (24)        ; Reserved by Apple
  785. sizeof                     EQU *                    ; size:   $1C (28)
  786.                         ENDR
  787. ; typedef struct SoundComponentLink *    SoundComponentLinkPtr
  788.  
  789. AudioInfo                RECORD 0
  790. capabilitiesFlags         ds.l    1                ; offset: $0 (0)        ; Describes device capabilities
  791. reserved                 ds.l    1                ; offset: $4 (4)        ; Reserved by Apple
  792. numVolumeSteps             ds.w    1                ; offset: $8 (8)        ; Number of significant increments between min and max volume
  793. sizeof                     EQU *                    ; size:   $A (10)
  794.                         ENDR
  795. ; typedef struct AudioInfo *            AudioInfoPtr
  796.  
  797. AudioFormatAtom            RECORD 0
  798. size                     ds.l    1                ; offset: $0 (0)        ;  = sizeof(AudioFormatAtom)
  799. atomType                 ds.l    1                ; offset: $4 (4)        ;  = kAudioFormatAtomType
  800. format                     ds.l    1                ; offset: $8 (8)
  801. sizeof                     EQU *                    ; size:   $C (12)
  802.                         ENDR
  803. ; typedef struct AudioFormatAtom *        AudioFormatAtomPtr
  804.  
  805. AudioEndianAtom            RECORD 0
  806. size                     ds.l    1                ; offset: $0 (0)        ;  = sizeof(AudioEndianAtom)
  807. atomType                 ds.l    1                ; offset: $4 (4)        ;  = kAudioEndianAtomType
  808. littleEndian             ds.w    1                ; offset: $8 (8)
  809. sizeof                     EQU *                    ; size:   $A (10)
  810.                         ENDR
  811. ; typedef struct AudioEndianAtom *        AudioEndianAtomPtr
  812.  
  813. AudioTerminatorAtom        RECORD 0
  814. size                     ds.l    1                ; offset: $0 (0)        ;  = sizeof(AudioTerminatorAtom)
  815. atomType                 ds.l    1                ; offset: $4 (4)        ;  = kAudioTerminatorAtomType
  816. sizeof                     EQU *                    ; size:   $8 (8)
  817.                         ENDR
  818. ; typedef struct AudioTerminatorAtom *    AudioTerminatorAtomPtr
  819.  
  820. ;  Sound Input Structures
  821.  
  822.  
  823. ; typedef SPB *                            SPBPtr
  824.  
  825. ; user procedures called by sound input routines
  826. ; Sound Input Parameter Block
  827. SPB                        RECORD 0
  828. inRefNum                 ds.l    1                ; offset: $0 (0)        ; reference number of sound input device
  829. count                     ds.l    1                ; offset: $4 (4)        ; number of bytes to record
  830. milliseconds             ds.l    1                ; offset: $8 (8)        ; number of milliseconds to record
  831. bufferLength             ds.l    1                ; offset: $C (12)        ; length of buffer in bytes
  832. bufferPtr                 ds.l    1                ; offset: $10 (16)        ; buffer to store sound data in
  833. completionRoutine         ds.l    1                ; offset: $14 (20)        ; completion routine
  834. interruptRoutine         ds.l    1                ; offset: $18 (24)        ; interrupt routine
  835. userLong                 ds.l    1                ; offset: $1C (28)        ; user-defined field
  836. error                     ds.w    1                ; offset: $20 (32)        ; error
  837. unused1                     ds.l    1                ; offset: $22 (34)        ; reserved - must be zero
  838. sizeof                     EQU *                    ; size:   $26 (38)
  839.                         ENDR
  840.  
  841. ;  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  842. ;   prototypes
  843. ;  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  844.  
  845.  
  846.  
  847.  
  848. ;   These two routines for Get/SetSoundVol should no longer be used.
  849. ;   They were for old Apple Sound Chip machines, and do not support the DSP or PowerMacs.
  850. ;   Use Get/SetDefaultOutputVolume instead, if you must change the user's machine.
  851.  
  852.  
  853.  
  854.     IF TARGET_CPU_68K THEN
  855. ;
  856. ; pascal void SetSoundVol(short level)
  857. ;
  858.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  859.         IMPORT_CFM_FUNCTION SetSoundVol
  860.     ENDIF
  861.  
  862.  
  863. ;
  864. ; pascal void GetSoundVol(short *level)
  865. ;
  866.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  867.         ; parameters:
  868.         ;    level           => A0
  869.         Macro
  870.         _GetSoundVol
  871.             clr.b               (A0)+
  872.             move.b              $0260,(A0)
  873.         EndM
  874.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  875.         IMPORT_CFM_FUNCTION GetSoundVol
  876.     ENDIF
  877.  
  878.     ENDIF    ; TARGET_CPU_68K
  879. ;  Sound Manager routines 
  880. ;
  881. ; pascal void SysBeep(short duration)
  882. ;
  883.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  884.         _SysBeep:    OPWORD    $A9C8
  885.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  886.         IMPORT_CFM_FUNCTION SysBeep
  887.     ENDIF
  888.  
  889. ;
  890. ; pascal OSErr SndDoCommand(SndChannelPtr chan, const SndCommand *cmd, Boolean noWait)
  891. ;
  892.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  893.         _SndDoCommand:    OPWORD    $A803
  894.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  895.         IMPORT_CFM_FUNCTION SndDoCommand
  896.     ENDIF
  897.  
  898. ;
  899. ; pascal OSErr SndDoImmediate(SndChannelPtr chan, const SndCommand *cmd)
  900. ;
  901.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  902.         _SndDoImmediate:    OPWORD    $A804
  903.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  904.         IMPORT_CFM_FUNCTION SndDoImmediate
  905.     ENDIF
  906.  
  907. ;
  908. ; pascal OSErr SndNewChannel(SndChannelPtr *chan, short synth, long init, SndCallBackUPP userRoutine)
  909. ;
  910.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  911.         _SndNewChannel:    OPWORD    $A807
  912.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  913.         IMPORT_CFM_FUNCTION SndNewChannel
  914.     ENDIF
  915.  
  916. ;
  917. ; pascal OSErr SndDisposeChannel(SndChannelPtr chan, Boolean quietNow)
  918. ;
  919.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  920.         _SndDisposeChannel:    OPWORD    $A801
  921.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  922.         IMPORT_CFM_FUNCTION SndDisposeChannel
  923.     ENDIF
  924.  
  925. ;
  926. ; pascal OSErr SndPlay(SndChannelPtr chan, SndListHandle sndHandle, Boolean async)
  927. ;
  928.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  929.         _SndPlay:    OPWORD    $A805
  930.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  931.         IMPORT_CFM_FUNCTION SndPlay
  932.     ENDIF
  933.  
  934.     IF OLDROUTINENAMES THEN
  935. ;
  936. ; pascal OSErr SndAddModifier(SndChannelPtr chan, Ptr modifier, short id, long init)
  937. ;
  938.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  939.         _SndAddModifier:    OPWORD    $A802
  940.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  941.         IMPORT_CFM_FUNCTION SndAddModifier
  942.     ENDIF
  943.  
  944.     ENDIF    ; OLDROUTINENAMES
  945. ;
  946. ; pascal OSErr SndControl(short id, SndCommand *cmd)
  947. ;
  948.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  949.         _SndControl:    OPWORD    $A806
  950.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  951.         IMPORT_CFM_FUNCTION SndControl
  952.     ENDIF
  953.  
  954. ;  Sound Manager 2.0 and later, uses _SoundDispatch 
  955. ;
  956. ; pascal NumVersion SndSoundManagerVersion(void )
  957. ;
  958.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  959.         Macro
  960.         _SndSoundManagerVersion
  961.             move.l              #$000C0008,D0
  962.             dc.w                $A800
  963.         EndM
  964.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  965.         IMPORT_CFM_FUNCTION SndSoundManagerVersion
  966.     ENDIF
  967.  
  968. ;
  969. ; pascal OSErr SndStartFilePlay(SndChannelPtr chan, short fRefNum, short resNum, long bufferSize, void *theBuffer, AudioSelectionPtr theSelection, FilePlayCompletionUPP theCompletion, Boolean async)
  970. ;
  971.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  972.         Macro
  973.         _SndStartFilePlay
  974.             move.l              #$0D000008,D0
  975.             dc.w                $A800
  976.         EndM
  977.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  978.         IMPORT_CFM_FUNCTION SndStartFilePlay
  979.     ENDIF
  980.  
  981. ;
  982. ; pascal OSErr SndPauseFilePlay(SndChannelPtr chan)
  983. ;
  984.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  985.         Macro
  986.         _SndPauseFilePlay
  987.             move.l              #$02040008,D0
  988.             dc.w                $A800
  989.         EndM
  990.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  991.         IMPORT_CFM_FUNCTION SndPauseFilePlay
  992.     ENDIF
  993.  
  994. ;
  995. ; pascal OSErr SndStopFilePlay(SndChannelPtr chan, Boolean quietNow)
  996. ;
  997.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  998.         Macro
  999.         _SndStopFilePlay
  1000.             move.l              #$03080008,D0
  1001.             dc.w                $A800
  1002.         EndM
  1003.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1004.         IMPORT_CFM_FUNCTION SndStopFilePlay
  1005.     ENDIF
  1006.  
  1007. ;
  1008. ; pascal OSErr SndChannelStatus(SndChannelPtr chan, short theLength, SCStatusPtr theStatus)
  1009. ;
  1010.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1011.         Macro
  1012.         _SndChannelStatus
  1013.             move.l              #$05100008,D0
  1014.             dc.w                $A800
  1015.         EndM
  1016.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1017.         IMPORT_CFM_FUNCTION SndChannelStatus
  1018.     ENDIF
  1019.  
  1020. ;
  1021. ; pascal OSErr SndManagerStatus(short theLength, SMStatusPtr theStatus)
  1022. ;
  1023.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1024.         Macro
  1025.         _SndManagerStatus
  1026.             move.l              #$03140008,D0
  1027.             dc.w                $A800
  1028.         EndM
  1029.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1030.         IMPORT_CFM_FUNCTION SndManagerStatus
  1031.     ENDIF
  1032.  
  1033. ;
  1034. ; pascal void SndGetSysBeepState(short *sysBeepState)
  1035. ;
  1036.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1037.         Macro
  1038.         _SndGetSysBeepState
  1039.             move.l              #$02180008,D0
  1040.             dc.w                $A800
  1041.         EndM
  1042.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1043.         IMPORT_CFM_FUNCTION SndGetSysBeepState
  1044.     ENDIF
  1045.  
  1046. ;
  1047. ; pascal OSErr SndSetSysBeepState(short sysBeepState)
  1048. ;
  1049.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1050.         Macro
  1051.         _SndSetSysBeepState
  1052.             move.l              #$011C0008,D0
  1053.             dc.w                $A800
  1054.         EndM
  1055.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1056.         IMPORT_CFM_FUNCTION SndSetSysBeepState
  1057.     ENDIF
  1058.  
  1059. ;
  1060. ; pascal OSErr SndPlayDoubleBuffer(SndChannelPtr chan, SndDoubleBufferHeaderPtr theParams)
  1061. ;
  1062.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1063.         Macro
  1064.         _SndPlayDoubleBuffer
  1065.             move.l              #$04200008,D0
  1066.             dc.w                $A800
  1067.         EndM
  1068.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1069.         IMPORT_CFM_FUNCTION SndPlayDoubleBuffer
  1070.     ENDIF
  1071.  
  1072. ;  MACE compression routines, uses _SoundDispatch 
  1073. ;
  1074. ; pascal NumVersion MACEVersion(void )
  1075. ;
  1076.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1077.         Macro
  1078.         _MACEVersion
  1079.             move.l              #$00000010,D0
  1080.             dc.w                $A800
  1081.         EndM
  1082.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1083.         IMPORT_CFM_FUNCTION MACEVersion
  1084.     ENDIF
  1085.  
  1086. ;
  1087. ; pascal void Comp3to1(const void *inBuffer, void *outBuffer, unsigned long cnt, StateBlockPtr inState, StateBlockPtr outState, unsigned long numChannels, unsigned long whichChannel)
  1088. ;
  1089.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1090.         Macro
  1091.         _Comp3to1
  1092.             move.l              #$00040010,D0
  1093.             dc.w                $A800
  1094.         EndM
  1095.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1096.         IMPORT_CFM_FUNCTION Comp3to1
  1097.     ENDIF
  1098.  
  1099. ;
  1100. ; pascal void Exp1to3(const void *inBuffer, void *outBuffer, unsigned long cnt, StateBlockPtr inState, StateBlockPtr outState, unsigned long numChannels, unsigned long whichChannel)
  1101. ;
  1102.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1103.         Macro
  1104.         _Exp1to3
  1105.             move.l              #$00080010,D0
  1106.             dc.w                $A800
  1107.         EndM
  1108.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1109.         IMPORT_CFM_FUNCTION Exp1to3
  1110.     ENDIF
  1111.  
  1112. ;
  1113. ; pascal void Comp6to1(const void *inBuffer, void *outBuffer, unsigned long cnt, StateBlockPtr inState, StateBlockPtr outState, unsigned long numChannels, unsigned long whichChannel)
  1114. ;
  1115.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1116.         Macro
  1117.         _Comp6to1
  1118.             move.l              #$000C0010,D0
  1119.             dc.w                $A800
  1120.         EndM
  1121.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1122.         IMPORT_CFM_FUNCTION Comp6to1
  1123.     ENDIF
  1124.  
  1125. ;
  1126. ; pascal void Exp1to6(const void *inBuffer, void *outBuffer, unsigned long cnt, StateBlockPtr inState, StateBlockPtr outState, unsigned long numChannels, unsigned long whichChannel)
  1127. ;
  1128.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1129.         Macro
  1130.         _Exp1to6
  1131.             move.l              #$00100010,D0
  1132.             dc.w                $A800
  1133.         EndM
  1134.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1135.         IMPORT_CFM_FUNCTION Exp1to6
  1136.     ENDIF
  1137.  
  1138. ;  Sound Manager 3.0 and later calls, uses _SoundDispatch 
  1139. ;
  1140. ; pascal OSErr GetSysBeepVolume(long *level)
  1141. ;
  1142.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1143.         Macro
  1144.         _GetSysBeepVolume
  1145.             move.l              #$02240018,D0
  1146.             dc.w                $A800
  1147.         EndM
  1148.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1149.         IMPORT_CFM_FUNCTION GetSysBeepVolume
  1150.     ENDIF
  1151.  
  1152. ;
  1153. ; pascal OSErr SetSysBeepVolume(long level)
  1154. ;
  1155.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1156.         Macro
  1157.         _SetSysBeepVolume
  1158.             move.l              #$02280018,D0
  1159.             dc.w                $A800
  1160.         EndM
  1161.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1162.         IMPORT_CFM_FUNCTION SetSysBeepVolume
  1163.     ENDIF
  1164.  
  1165. ;
  1166. ; pascal OSErr GetDefaultOutputVolume(long *level)
  1167. ;
  1168.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1169.         Macro
  1170.         _GetDefaultOutputVolume
  1171.             move.l              #$022C0018,D0
  1172.             dc.w                $A800
  1173.         EndM
  1174.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1175.         IMPORT_CFM_FUNCTION GetDefaultOutputVolume
  1176.     ENDIF
  1177.  
  1178. ;
  1179. ; pascal OSErr SetDefaultOutputVolume(long level)
  1180. ;
  1181.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1182.         Macro
  1183.         _SetDefaultOutputVolume
  1184.             move.l              #$02300018,D0
  1185.             dc.w                $A800
  1186.         EndM
  1187.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1188.         IMPORT_CFM_FUNCTION SetDefaultOutputVolume
  1189.     ENDIF
  1190.  
  1191. ;
  1192. ; pascal OSErr GetSoundHeaderOffset(SndListHandle sndHandle, long *offset)
  1193. ;
  1194.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1195.         Macro
  1196.         _GetSoundHeaderOffset
  1197.             move.l              #$04040018,D0
  1198.             dc.w                $A800
  1199.         EndM
  1200.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1201.         IMPORT_CFM_FUNCTION GetSoundHeaderOffset
  1202.     ENDIF
  1203.  
  1204. ;
  1205. ; pascal UnsignedFixed UnsignedFixedMulDiv(UnsignedFixed value, UnsignedFixed multiplier, UnsignedFixed divisor)
  1206. ;
  1207.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1208.         Macro
  1209.         _UnsignedFixedMulDiv
  1210.             move.l              #$060C0018,D0
  1211.             dc.w                $A800
  1212.         EndM
  1213.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1214.         IMPORT_CFM_FUNCTION UnsignedFixedMulDiv
  1215.     ENDIF
  1216.  
  1217. ;
  1218. ; pascal OSErr GetCompressionInfo(short compressionID, OSType format, short numChannels, short sampleSize, CompressionInfoPtr cp)
  1219. ;
  1220.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1221.         Macro
  1222.         _GetCompressionInfo
  1223.             move.l              #$07100018,D0
  1224.             dc.w                $A800
  1225.         EndM
  1226.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1227.         IMPORT_CFM_FUNCTION GetCompressionInfo
  1228.     ENDIF
  1229.  
  1230. ;
  1231. ; pascal OSErr SetSoundPreference(OSType theType, Str255 name, Handle settings)
  1232. ;
  1233.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1234.         Macro
  1235.         _SetSoundPreference
  1236.             move.l              #$06340018,D0
  1237.             dc.w                $A800
  1238.         EndM
  1239.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1240.         IMPORT_CFM_FUNCTION SetSoundPreference
  1241.     ENDIF
  1242.  
  1243. ;
  1244. ; pascal OSErr GetSoundPreference(OSType theType, Str255 name, Handle settings)
  1245. ;
  1246.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1247.         Macro
  1248.         _GetSoundPreference
  1249.             move.l              #$06380018,D0
  1250.             dc.w                $A800
  1251.         EndM
  1252.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1253.         IMPORT_CFM_FUNCTION GetSoundPreference
  1254.     ENDIF
  1255.  
  1256. ;
  1257. ; pascal OSErr OpenMixerSoundComponent(SoundComponentDataPtr outputDescription, long outputFlags, ComponentInstance *mixerComponent)
  1258. ;
  1259.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1260.         Macro
  1261.         _OpenMixerSoundComponent
  1262.             move.l              #$06140018,D0
  1263.             dc.w                $A800
  1264.         EndM
  1265.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1266.         IMPORT_CFM_FUNCTION OpenMixerSoundComponent
  1267.     ENDIF
  1268.  
  1269. ;
  1270. ; pascal OSErr CloseMixerSoundComponent(ComponentInstance ci)
  1271. ;
  1272.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1273.         Macro
  1274.         _CloseMixerSoundComponent
  1275.             move.l              #$02180018,D0
  1276.             dc.w                $A800
  1277.         EndM
  1278.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1279.         IMPORT_CFM_FUNCTION CloseMixerSoundComponent
  1280.     ENDIF
  1281.  
  1282. ;  Sound Manager 3.1 and later calls, uses _SoundDispatch 
  1283. ;
  1284. ; pascal OSErr SndGetInfo(SndChannelPtr chan, OSType selector, void *infoPtr)
  1285. ;
  1286.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1287.         Macro
  1288.         _SndGetInfo
  1289.             move.l              #$063C0018,D0
  1290.             dc.w                $A800
  1291.         EndM
  1292.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1293.         IMPORT_CFM_FUNCTION SndGetInfo
  1294.     ENDIF
  1295.  
  1296. ;
  1297. ; pascal OSErr SndSetInfo(SndChannelPtr chan, OSType selector, const void *infoPtr)
  1298. ;
  1299.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1300.         Macro
  1301.         _SndSetInfo
  1302.             move.l              #$06400018,D0
  1303.             dc.w                $A800
  1304.         EndM
  1305.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1306.         IMPORT_CFM_FUNCTION SndSetInfo
  1307.     ENDIF
  1308.  
  1309. ;
  1310. ; pascal OSErr GetSoundOutputInfo(Component outputDevice, OSType selector, void *infoPtr)
  1311. ;
  1312.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1313.         Macro
  1314.         _GetSoundOutputInfo
  1315.             move.l              #$06440018,D0
  1316.             dc.w                $A800
  1317.         EndM
  1318.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1319.         IMPORT_CFM_FUNCTION GetSoundOutputInfo
  1320.     ENDIF
  1321.  
  1322. ;
  1323. ; pascal OSErr SetSoundOutputInfo(Component outputDevice, OSType selector, const void *infoPtr)
  1324. ;
  1325.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1326.         Macro
  1327.         _SetSoundOutputInfo
  1328.             move.l              #$06480018,D0
  1329.             dc.w                $A800
  1330.         EndM
  1331.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1332.         IMPORT_CFM_FUNCTION SetSoundOutputInfo
  1333.     ENDIF
  1334.  
  1335. ;  Sound Manager 3.2 and later calls, uses _SoundDispatch 
  1336. ;
  1337. ; pascal OSErr GetCompressionName(OSType compressionType, Str255 compressionName)
  1338. ;
  1339.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1340.         Macro
  1341.         _GetCompressionName
  1342.             move.l              #$044C0018,D0
  1343.             dc.w                $A800
  1344.         EndM
  1345.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1346.         IMPORT_CFM_FUNCTION GetCompressionName
  1347.     ENDIF
  1348.  
  1349. ;
  1350. ; pascal OSErr SoundConverterOpen(const SoundComponentData *inputFormat, const SoundComponentData *outputFormat, SoundConverter *sc)
  1351. ;
  1352.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1353.         Macro
  1354.         _SoundConverterOpen
  1355.             move.l              #$06500018,D0
  1356.             dc.w                $A800
  1357.         EndM
  1358.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1359.         IMPORT_CFM_FUNCTION SoundConverterOpen
  1360.     ENDIF
  1361.  
  1362. ;
  1363. ; pascal OSErr SoundConverterClose(SoundConverter sc)
  1364. ;
  1365.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1366.         Macro
  1367.         _SoundConverterClose
  1368.             move.l              #$02540018,D0
  1369.             dc.w                $A800
  1370.         EndM
  1371.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1372.         IMPORT_CFM_FUNCTION SoundConverterClose
  1373.     ENDIF
  1374.  
  1375. ;
  1376. ; pascal OSErr SoundConverterGetBufferSizes(SoundConverter sc, unsigned long inputBytesTarget, unsigned long *inputFrames, unsigned long *inputBytes, unsigned long *outputBytes)
  1377. ;
  1378.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1379.         Macro
  1380.         _SoundConverterGetBufferSizes
  1381.             move.l              #$0A580018,D0
  1382.             dc.w                $A800
  1383.         EndM
  1384.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1385.         IMPORT_CFM_FUNCTION SoundConverterGetBufferSizes
  1386.     ENDIF
  1387.  
  1388. ;
  1389. ; pascal OSErr SoundConverterBeginConversion(SoundConverter sc)
  1390. ;
  1391.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1392.         Macro
  1393.         _SoundConverterBeginConversion
  1394.             move.l              #$025C0018,D0
  1395.             dc.w                $A800
  1396.         EndM
  1397.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1398.         IMPORT_CFM_FUNCTION SoundConverterBeginConversion
  1399.     ENDIF
  1400.  
  1401. ;
  1402. ; pascal OSErr SoundConverterConvertBuffer(SoundConverter sc, const void *inputPtr, unsigned long inputFrames, void *outputPtr, unsigned long *outputFrames, unsigned long *outputBytes)
  1403. ;
  1404.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1405.         Macro
  1406.         _SoundConverterConvertBuffer
  1407.             move.l              #$0C600018,D0
  1408.             dc.w                $A800
  1409.         EndM
  1410.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1411.         IMPORT_CFM_FUNCTION SoundConverterConvertBuffer
  1412.     ENDIF
  1413.  
  1414. ;
  1415. ; pascal OSErr SoundConverterEndConversion(SoundConverter sc, void *outputPtr, unsigned long *outputFrames, unsigned long *outputBytes)
  1416. ;
  1417.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1418.         Macro
  1419.         _SoundConverterEndConversion
  1420.             move.l              #$08640018,D0
  1421.             dc.w                $A800
  1422.         EndM
  1423.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1424.         IMPORT_CFM_FUNCTION SoundConverterEndConversion
  1425.     ENDIF
  1426.  
  1427. ;  Sound Manager 3.3 and later calls, uses _SoundDispatch 
  1428. ;
  1429. ; pascal OSErr SoundConverterGetInfo(SoundConverter sc, OSType selector, void *infoPtr)
  1430. ;
  1431.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1432.         Macro
  1433.         _SoundConverterGetInfo
  1434.             move.l              #$06680018,D0
  1435.             dc.w                $A800
  1436.         EndM
  1437.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1438.         IMPORT_CFM_FUNCTION SoundConverterGetInfo
  1439.     ENDIF
  1440.  
  1441. ;
  1442. ; pascal OSErr SoundConverterSetInfo(SoundConverter sc, OSType selector, void *infoPtr)
  1443. ;
  1444.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1445.         Macro
  1446.         _SoundConverterSetInfo
  1447.             move.l              #$066C0018,D0
  1448.             dc.w                $A800
  1449.         EndM
  1450.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1451.         IMPORT_CFM_FUNCTION SoundConverterSetInfo
  1452.     ENDIF
  1453.  
  1454.  
  1455. ;  Sound Component Functions
  1456. ;   basic sound component functions
  1457.  
  1458.  
  1459.  
  1460. ;
  1461. ; pascal ComponentResult SoundComponentInitOutputDevice(ComponentInstance ti, long actions)
  1462. ;
  1463.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1464.         Macro
  1465.         _SoundComponentInitOutputDevice
  1466.             move.l              #$00040001,-(sp)
  1467.             moveq               #0,D0
  1468.             dc.w                $A82A
  1469.         EndM
  1470.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1471.         IMPORT_CFM_FUNCTION SoundComponentInitOutputDevice
  1472.     ENDIF
  1473.  
  1474. ;
  1475. ; pascal ComponentResult SoundComponentSetSource(ComponentInstance ti, SoundSource sourceID, ComponentInstance source)
  1476. ;
  1477.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1478.         Macro
  1479.         _SoundComponentSetSource
  1480.             move.l              #$00080002,-(sp)
  1481.             moveq               #0,D0
  1482.             dc.w                $A82A
  1483.         EndM
  1484.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1485.         IMPORT_CFM_FUNCTION SoundComponentSetSource
  1486.     ENDIF
  1487.  
  1488. ;
  1489. ; pascal ComponentResult SoundComponentGetSource(ComponentInstance ti, SoundSource sourceID, ComponentInstance *source)
  1490. ;
  1491.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1492.         Macro
  1493.         _SoundComponentGetSource
  1494.             move.l              #$00080003,-(sp)
  1495.             moveq               #0,D0
  1496.             dc.w                $A82A
  1497.         EndM
  1498.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1499.         IMPORT_CFM_FUNCTION SoundComponentGetSource
  1500.     ENDIF
  1501.  
  1502. ;
  1503. ; pascal ComponentResult SoundComponentGetSourceData(ComponentInstance ti, SoundComponentDataPtr *sourceData)
  1504. ;
  1505.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1506.         Macro
  1507.         _SoundComponentGetSourceData
  1508.             move.l              #$00040004,-(sp)
  1509.             moveq               #0,D0
  1510.             dc.w                $A82A
  1511.         EndM
  1512.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1513.         IMPORT_CFM_FUNCTION SoundComponentGetSourceData
  1514.     ENDIF
  1515.  
  1516. ;
  1517. ; pascal ComponentResult SoundComponentSetOutput(ComponentInstance ti, SoundComponentDataPtr requested, SoundComponentDataPtr *actual)
  1518. ;
  1519.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1520.         Macro
  1521.         _SoundComponentSetOutput
  1522.             move.l              #$00080005,-(sp)
  1523.             moveq               #0,D0
  1524.             dc.w                $A82A
  1525.         EndM
  1526.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1527.         IMPORT_CFM_FUNCTION SoundComponentSetOutput
  1528.     ENDIF
  1529.  
  1530. ;  junction methods for the mixer, must be called at non-interrupt level
  1531. ;
  1532. ; pascal ComponentResult SoundComponentAddSource(ComponentInstance ti, SoundSource *sourceID)
  1533. ;
  1534.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1535.         Macro
  1536.         _SoundComponentAddSource
  1537.             move.l              #$00040101,-(sp)
  1538.             moveq               #0,D0
  1539.             dc.w                $A82A
  1540.         EndM
  1541.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1542.         IMPORT_CFM_FUNCTION SoundComponentAddSource
  1543.     ENDIF
  1544.  
  1545. ;
  1546. ; pascal ComponentResult SoundComponentRemoveSource(ComponentInstance ti, SoundSource sourceID)
  1547. ;
  1548.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1549.         Macro
  1550.         _SoundComponentRemoveSource
  1551.             move.l              #$00040102,-(sp)
  1552.             moveq               #0,D0
  1553.             dc.w                $A82A
  1554.         EndM
  1555.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1556.         IMPORT_CFM_FUNCTION SoundComponentRemoveSource
  1557.     ENDIF
  1558.  
  1559. ;  info methods
  1560. ;
  1561. ; pascal ComponentResult SoundComponentGetInfo(ComponentInstance ti, SoundSource sourceID, OSType selector, void *infoPtr)
  1562. ;
  1563.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1564.         Macro
  1565.         _SoundComponentGetInfo
  1566.             move.l              #$000C0103,-(sp)
  1567.             moveq               #0,D0
  1568.             dc.w                $A82A
  1569.         EndM
  1570.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1571.         IMPORT_CFM_FUNCTION SoundComponentGetInfo
  1572.     ENDIF
  1573.  
  1574. ;
  1575. ; pascal ComponentResult SoundComponentSetInfo(ComponentInstance ti, SoundSource sourceID, OSType selector, void *infoPtr)
  1576. ;
  1577.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1578.         Macro
  1579.         _SoundComponentSetInfo
  1580.             move.l              #$000C0104,-(sp)
  1581.             moveq               #0,D0
  1582.             dc.w                $A82A
  1583.         EndM
  1584.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1585.         IMPORT_CFM_FUNCTION SoundComponentSetInfo
  1586.     ENDIF
  1587.  
  1588. ;  control methods
  1589. ;
  1590. ; pascal ComponentResult SoundComponentStartSource(ComponentInstance ti, short count, SoundSource *sources)
  1591. ;
  1592.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1593.         Macro
  1594.         _SoundComponentStartSource
  1595.             move.l              #$00060105,-(sp)
  1596.             moveq               #0,D0
  1597.             dc.w                $A82A
  1598.         EndM
  1599.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1600.         IMPORT_CFM_FUNCTION SoundComponentStartSource
  1601.     ENDIF
  1602.  
  1603. ;
  1604. ; pascal ComponentResult SoundComponentStopSource(ComponentInstance ti, short count, SoundSource *sources)
  1605. ;
  1606.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1607.         Macro
  1608.         _SoundComponentStopSource
  1609.             move.l              #$00060106,-(sp)
  1610.             moveq               #0,D0
  1611.             dc.w                $A82A
  1612.         EndM
  1613.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1614.         IMPORT_CFM_FUNCTION SoundComponentStopSource
  1615.     ENDIF
  1616.  
  1617. ;
  1618. ; pascal ComponentResult SoundComponentPauseSource(ComponentInstance ti, short count, SoundSource *sources)
  1619. ;
  1620.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1621.         Macro
  1622.         _SoundComponentPauseSource
  1623.             move.l              #$00060107,-(sp)
  1624.             moveq               #0,D0
  1625.             dc.w                $A82A
  1626.         EndM
  1627.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1628.         IMPORT_CFM_FUNCTION SoundComponentPauseSource
  1629.     ENDIF
  1630.  
  1631. ;
  1632. ; pascal ComponentResult SoundComponentPlaySourceBuffer(ComponentInstance ti, SoundSource sourceID, SoundParamBlockPtr pb, long actions)
  1633. ;
  1634.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1635.         Macro
  1636.         _SoundComponentPlaySourceBuffer
  1637.             move.l              #$000C0108,-(sp)
  1638.             moveq               #0,D0
  1639.             dc.w                $A82A
  1640.         EndM
  1641.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1642.         IMPORT_CFM_FUNCTION SoundComponentPlaySourceBuffer
  1643.     ENDIF
  1644.  
  1645. ; Audio Components
  1646. ; Volume is described as a value between 0 and 1, with 0 indicating minimum
  1647. ;  volume and 1 indicating maximum volume; if the device doesn't support
  1648. ;  software control of volume, then a value of unimpErr is returned, indicating
  1649. ;  that these functions are not supported by the device
  1650.  
  1651. ;
  1652. ; pascal ComponentResult AudioGetVolume(ComponentInstance ac, short whichChannel, ShortFixed *volume)
  1653. ;
  1654.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1655.         Macro
  1656.         _AudioGetVolume
  1657.             move.l              #$00060000,-(sp)
  1658.             moveq               #0,D0
  1659.             dc.w                $A82A
  1660.         EndM
  1661.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1662.         IMPORT_CFM_FUNCTION AudioGetVolume
  1663.     ENDIF
  1664.  
  1665. ;
  1666. ; pascal ComponentResult AudioSetVolume(ComponentInstance ac, short whichChannel, ShortFixed volume)
  1667. ;
  1668.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1669.         Macro
  1670.         _AudioSetVolume
  1671.             move.l              #$00040001,-(sp)
  1672.             moveq               #0,D0
  1673.             dc.w                $A82A
  1674.         EndM
  1675.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1676.         IMPORT_CFM_FUNCTION AudioSetVolume
  1677.     ENDIF
  1678.  
  1679. ; If the device doesn't support software control of mute, then a value of unimpErr is
  1680. ;returned, indicating that these functions are not supported by the device.
  1681. ;
  1682. ; pascal ComponentResult AudioGetMute(ComponentInstance ac, short whichChannel, short *mute)
  1683. ;
  1684.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1685.         Macro
  1686.         _AudioGetMute
  1687.             move.l              #$00060002,-(sp)
  1688.             moveq               #0,D0
  1689.             dc.w                $A82A
  1690.         EndM
  1691.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1692.         IMPORT_CFM_FUNCTION AudioGetMute
  1693.     ENDIF
  1694.  
  1695. ;
  1696. ; pascal ComponentResult AudioSetMute(ComponentInstance ac, short whichChannel, short mute)
  1697. ;
  1698.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1699.         Macro
  1700.         _AudioSetMute
  1701.             move.l              #$00040003,-(sp)
  1702.             moveq               #0,D0
  1703.             dc.w                $A82A
  1704.         EndM
  1705.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1706.         IMPORT_CFM_FUNCTION AudioSetMute
  1707.     ENDIF
  1708.  
  1709. ; AudioSetToDefaults causes the associated device to reset its volume and mute values
  1710. ;(and perhaps other characteristics, e.g. attenuation) to "factory default" settings
  1711. ;
  1712. ; pascal ComponentResult AudioSetToDefaults(ComponentInstance ac)
  1713. ;
  1714.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1715.         Macro
  1716.         _AudioSetToDefaults
  1717.             move.l              #$00000004,-(sp)
  1718.             moveq               #0,D0
  1719.             dc.w                $A82A
  1720.         EndM
  1721.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1722.         IMPORT_CFM_FUNCTION AudioSetToDefaults
  1723.     ENDIF
  1724.  
  1725. ; This routine is required; it must be implemented by all audio components
  1726.  
  1727. ;
  1728. ; pascal ComponentResult AudioGetInfo(ComponentInstance ac, AudioInfoPtr info)
  1729. ;
  1730.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1731.         Macro
  1732.         _AudioGetInfo
  1733.             move.l              #$00040005,-(sp)
  1734.             moveq               #0,D0
  1735.             dc.w                $A82A
  1736.         EndM
  1737.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1738.         IMPORT_CFM_FUNCTION AudioGetInfo
  1739.     ENDIF
  1740.  
  1741. ;
  1742. ; pascal ComponentResult AudioGetBass(ComponentInstance ac, short whichChannel, short *bass)
  1743. ;
  1744.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1745.         Macro
  1746.         _AudioGetBass
  1747.             move.l              #$00060006,-(sp)
  1748.             moveq               #0,D0
  1749.             dc.w                $A82A
  1750.         EndM
  1751.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1752.         IMPORT_CFM_FUNCTION AudioGetBass
  1753.     ENDIF
  1754.  
  1755. ;
  1756. ; pascal ComponentResult AudioSetBass(ComponentInstance ac, short whichChannel, short bass)
  1757. ;
  1758.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1759.         Macro
  1760.         _AudioSetBass
  1761.             move.l              #$00040007,-(sp)
  1762.             moveq               #0,D0
  1763.             dc.w                $A82A
  1764.         EndM
  1765.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1766.         IMPORT_CFM_FUNCTION AudioSetBass
  1767.     ENDIF
  1768.  
  1769. ;
  1770. ; pascal ComponentResult AudioGetTreble(ComponentInstance ac, short whichChannel, short *Treble)
  1771. ;
  1772.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1773.         Macro
  1774.         _AudioGetTreble
  1775.             move.l              #$00060008,-(sp)
  1776.             moveq               #0,D0
  1777.             dc.w                $A82A
  1778.         EndM
  1779.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1780.         IMPORT_CFM_FUNCTION AudioGetTreble
  1781.     ENDIF
  1782.  
  1783. ;
  1784. ; pascal ComponentResult AudioSetTreble(ComponentInstance ac, short whichChannel, short Treble)
  1785. ;
  1786.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1787.         Macro
  1788.         _AudioSetTreble
  1789.             move.l              #$00040009,-(sp)
  1790.             moveq               #0,D0
  1791.             dc.w                $A82A
  1792.         EndM
  1793.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1794.         IMPORT_CFM_FUNCTION AudioSetTreble
  1795.     ENDIF
  1796.  
  1797. ;
  1798. ; pascal ComponentResult AudioGetOutputDevice(ComponentInstance ac, Component *outputDevice)
  1799. ;
  1800.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1801.         Macro
  1802.         _AudioGetOutputDevice
  1803.             move.l              #$0004000A,-(sp)
  1804.             moveq               #0,D0
  1805.             dc.w                $A82A
  1806.         EndM
  1807.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1808.         IMPORT_CFM_FUNCTION AudioGetOutputDevice
  1809.     ENDIF
  1810.  
  1811.  
  1812. ; This is routine is private to the AudioVision component.  It enables the watching of the mute key.
  1813. ;
  1814. ; pascal ComponentResult AudioMuteOnEvent(ComponentInstance ac, short muteOnEvent)
  1815. ;
  1816.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1817.         Macro
  1818.         _AudioMuteOnEvent
  1819.             move.l              #$00020081,-(sp)
  1820.             moveq               #0,D0
  1821.             dc.w                $A82A
  1822.         EndM
  1823.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1824.         IMPORT_CFM_FUNCTION AudioMuteOnEvent
  1825.     ENDIF
  1826.  
  1827.  
  1828. kDelegatedSoundComponentSelectors EQU    $0100
  1829. ;  Sound Input Manager routines, uses _SoundDispatch 
  1830. ;
  1831. ; pascal NumVersion SPBVersion(void )
  1832. ;
  1833.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1834.         Macro
  1835.         _SPBVersion
  1836.             move.l              #$00000014,D0
  1837.             dc.w                $A800
  1838.         EndM
  1839.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1840.         IMPORT_CFM_FUNCTION SPBVersion
  1841.     ENDIF
  1842.  
  1843. ;
  1844. ; pascal OSErr SndRecord(ModalFilterUPP filterProc, Point corner, OSType quality, SndListHandle *sndHandle)
  1845. ;
  1846.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1847.         Macro
  1848.         _SndRecord
  1849.             move.l              #$08040014,D0
  1850.             dc.w                $A800
  1851.         EndM
  1852.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1853.         IMPORT_CFM_FUNCTION SndRecord
  1854.     ENDIF
  1855.  
  1856. ;
  1857. ; pascal OSErr SndRecordToFile(ModalFilterUPP filterProc, Point corner, OSType quality, short fRefNum)
  1858. ;
  1859.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1860.         Macro
  1861.         _SndRecordToFile
  1862.             move.l              #$07080014,D0
  1863.             dc.w                $A800
  1864.         EndM
  1865.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1866.         IMPORT_CFM_FUNCTION SndRecordToFile
  1867.     ENDIF
  1868.  
  1869. ;
  1870. ; pascal OSErr SPBSignInDevice(short deviceRefNum, ConstStr255Param deviceName)
  1871. ;
  1872.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1873.         Macro
  1874.         _SPBSignInDevice
  1875.             move.l              #$030C0014,D0
  1876.             dc.w                $A800
  1877.         EndM
  1878.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1879.         IMPORT_CFM_FUNCTION SPBSignInDevice
  1880.     ENDIF
  1881.  
  1882. ;
  1883. ; pascal OSErr SPBSignOutDevice(short deviceRefNum)
  1884. ;
  1885.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1886.         Macro
  1887.         _SPBSignOutDevice
  1888.             move.l              #$01100014,D0
  1889.             dc.w                $A800
  1890.         EndM
  1891.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1892.         IMPORT_CFM_FUNCTION SPBSignOutDevice
  1893.     ENDIF
  1894.  
  1895. ;
  1896. ; pascal OSErr SPBGetIndexedDevice(short count, Str255 deviceName, Handle *deviceIconHandle)
  1897. ;
  1898.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1899.         Macro
  1900.         _SPBGetIndexedDevice
  1901.             move.l              #$05140014,D0
  1902.             dc.w                $A800
  1903.         EndM
  1904.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1905.         IMPORT_CFM_FUNCTION SPBGetIndexedDevice
  1906.     ENDIF
  1907.  
  1908. ;
  1909. ; pascal OSErr SPBOpenDevice(ConstStr255Param deviceName, short permission, long *inRefNum)
  1910. ;
  1911.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1912.         Macro
  1913.         _SPBOpenDevice
  1914.             move.l              #$05180014,D0
  1915.             dc.w                $A800
  1916.         EndM
  1917.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1918.         IMPORT_CFM_FUNCTION SPBOpenDevice
  1919.     ENDIF
  1920.  
  1921. ;
  1922. ; pascal OSErr SPBCloseDevice(long inRefNum)
  1923. ;
  1924.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1925.         Macro
  1926.         _SPBCloseDevice
  1927.             move.l              #$021C0014,D0
  1928.             dc.w                $A800
  1929.         EndM
  1930.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1931.         IMPORT_CFM_FUNCTION SPBCloseDevice
  1932.     ENDIF
  1933.  
  1934. ;
  1935. ; pascal OSErr SPBRecord(SPBPtr inParamPtr, Boolean asynchFlag)
  1936. ;
  1937.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1938.         Macro
  1939.         _SPBRecord
  1940.             move.l              #$03200014,D0
  1941.             dc.w                $A800
  1942.         EndM
  1943.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1944.         IMPORT_CFM_FUNCTION SPBRecord
  1945.     ENDIF
  1946.  
  1947. ;
  1948. ; pascal OSErr SPBRecordToFile(short fRefNum, SPBPtr inParamPtr, Boolean asynchFlag)
  1949. ;
  1950.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1951.         Macro
  1952.         _SPBRecordToFile
  1953.             move.l              #$04240014,D0
  1954.             dc.w                $A800
  1955.         EndM
  1956.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1957.         IMPORT_CFM_FUNCTION SPBRecordToFile
  1958.     ENDIF
  1959.  
  1960. ;
  1961. ; pascal OSErr SPBPauseRecording(long inRefNum)
  1962. ;
  1963.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1964.         Macro
  1965.         _SPBPauseRecording
  1966.             move.l              #$02280014,D0
  1967.             dc.w                $A800
  1968.         EndM
  1969.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1970.         IMPORT_CFM_FUNCTION SPBPauseRecording
  1971.     ENDIF
  1972.  
  1973. ;
  1974. ; pascal OSErr SPBResumeRecording(long inRefNum)
  1975. ;
  1976.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1977.         Macro
  1978.         _SPBResumeRecording
  1979.             move.l              #$022C0014,D0
  1980.             dc.w                $A800
  1981.         EndM
  1982.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1983.         IMPORT_CFM_FUNCTION SPBResumeRecording
  1984.     ENDIF
  1985.  
  1986. ;
  1987. ; pascal OSErr SPBStopRecording(long inRefNum)
  1988. ;
  1989.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1990.         Macro
  1991.         _SPBStopRecording
  1992.             move.l              #$02300014,D0
  1993.             dc.w                $A800
  1994.         EndM
  1995.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1996.         IMPORT_CFM_FUNCTION SPBStopRecording
  1997.     ENDIF
  1998.  
  1999. ;
  2000. ; pascal OSErr SPBGetRecordingStatus(long inRefNum, short *recordingStatus, short *meterLevel, unsigned long *totalSamplesToRecord, unsigned long *numberOfSamplesRecorded, unsigned long *totalMsecsToRecord, unsigned long *numberOfMsecsRecorded)
  2001. ;
  2002.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  2003.         Macro
  2004.         _SPBGetRecordingStatus
  2005.             move.l              #$0E340014,D0
  2006.             dc.w                $A800
  2007.         EndM
  2008.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  2009.         IMPORT_CFM_FUNCTION SPBGetRecordingStatus
  2010.     ENDIF
  2011.  
  2012. ;
  2013. ; pascal OSErr SPBGetDeviceInfo(long inRefNum, OSType infoType, void *infoData)
  2014. ;
  2015.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  2016.         Macro
  2017.         _SPBGetDeviceInfo
  2018.             move.l              #$06380014,D0
  2019.             dc.w                $A800
  2020.         EndM
  2021.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  2022.         IMPORT_CFM_FUNCTION SPBGetDeviceInfo
  2023.     ENDIF
  2024.  
  2025. ;
  2026. ; pascal OSErr SPBSetDeviceInfo(long inRefNum, OSType infoType, void *infoData)
  2027. ;
  2028.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  2029.         Macro
  2030.         _SPBSetDeviceInfo
  2031.             move.l              #$063C0014,D0
  2032.             dc.w                $A800
  2033.         EndM
  2034.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  2035.         IMPORT_CFM_FUNCTION SPBSetDeviceInfo
  2036.     ENDIF
  2037.  
  2038. ;
  2039. ; pascal OSErr SPBMillisecondsToBytes(long inRefNum, long *milliseconds)
  2040. ;
  2041.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  2042.         Macro
  2043.         _SPBMillisecondsToBytes
  2044.             move.l              #$04400014,D0
  2045.             dc.w                $A800
  2046.         EndM
  2047.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  2048.         IMPORT_CFM_FUNCTION SPBMillisecondsToBytes
  2049.     ENDIF
  2050.  
  2051. ;
  2052. ; pascal OSErr SPBBytesToMilliseconds(long inRefNum, long *byteCount)
  2053. ;
  2054.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  2055.         Macro
  2056.         _SPBBytesToMilliseconds
  2057.             move.l              #$04440014,D0
  2058.             dc.w                $A800
  2059.         EndM
  2060.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  2061.         IMPORT_CFM_FUNCTION SPBBytesToMilliseconds
  2062.     ENDIF
  2063.  
  2064. ;
  2065. ; pascal OSErr SetupSndHeader(SndListHandle sndHandle, short numChannels, UnsignedFixed sampleRate, short sampleSize, OSType compressionType, short baseNote, unsigned long numBytes, short *headerLen)
  2066. ;
  2067.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  2068.         Macro
  2069.         _SetupSndHeader
  2070.             move.l              #$0D480014,D0
  2071.             dc.w                $A800
  2072.         EndM
  2073.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  2074.         IMPORT_CFM_FUNCTION SetupSndHeader
  2075.     ENDIF
  2076.  
  2077. ;
  2078. ; pascal OSErr SetupAIFFHeader(short fRefNum, short numChannels, UnsignedFixed sampleRate, short sampleSize, OSType compressionType, unsigned long numBytes, unsigned long numFrames)
  2079. ;
  2080.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  2081.         Macro
  2082.         _SetupAIFFHeader
  2083.             move.l              #$0B4C0014,D0
  2084.             dc.w                $A800
  2085.         EndM
  2086.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  2087.         IMPORT_CFM_FUNCTION SetupAIFFHeader
  2088.     ENDIF
  2089.  
  2090. ;  Sound Input Manager 1.1 and later calls, uses _SoundDispatch 
  2091. ;
  2092. ; pascal OSErr ParseAIFFHeader(short fRefNum, SoundComponentData *sndInfo, unsigned long *numFrames, unsigned long *dataOffset)
  2093. ;
  2094.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  2095.         Macro
  2096.         _ParseAIFFHeader
  2097.             move.l              #$07580014,D0
  2098.             dc.w                $A800
  2099.         EndM
  2100.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  2101.         IMPORT_CFM_FUNCTION ParseAIFFHeader
  2102.     ENDIF
  2103.  
  2104. ;
  2105. ; pascal OSErr ParseSndHeader(SndListHandle sndHandle, SoundComponentData *sndInfo, unsigned long *numFrames, unsigned long *dataOffset)
  2106. ;
  2107.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  2108.         Macro
  2109.         _ParseSndHeader
  2110.             move.l              #$085C0014,D0
  2111.             dc.w                $A800
  2112.         EndM
  2113.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  2114.         IMPORT_CFM_FUNCTION ParseSndHeader
  2115.     ENDIF
  2116.  
  2117.     IF ¬ TARGET_OS_MAC THEN
  2118. ;   Only to be used if you are writing a sound input component; this 
  2119. ;   is the param block for a read request from the SoundMgr to the   
  2120. ;   sound input component.  Not to be confused with the SPB struct   
  2121. ;   above, which is the param block for a read request from an app   
  2122. ;   to the SoundMgr.                                                 
  2123.  
  2124.  
  2125. ; typedef SndInputCmpParam *            SndInputCmpParamPtr
  2126.  
  2127. SndInputCmpParam        RECORD 0
  2128. ioCompletion             ds.l    1                ; offset: $0 (0)        ;  completion routine [pointer]
  2129. ioInterrupt                 ds.l    1                ; offset: $4 (4)        ;  interrupt routine [pointer]
  2130. ioResult                 ds.w    1                ; offset: $8 (8)        ;  I/O result code [word]
  2131. pad                         ds.w    1                ; offset: $A (10)
  2132. ioReqCount                 ds.l    1                ; offset: $C (12)
  2133. ioActCount                 ds.l    1                ; offset: $10 (16)
  2134. ioBuffer                 ds.l    1                ; offset: $14 (20)
  2135. ioMisc                     ds.l    1                ; offset: $18 (24)
  2136. sizeof                     EQU *                    ; size:   $1C (28)
  2137.                         ENDR
  2138. ;
  2139. ; pascal ComponentResult SndInputReadAsync(ComponentInstance self, SndInputCmpParamPtr SICParmPtr)
  2140. ;
  2141.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  2142.         Macro
  2143.         _SndInputReadAsync
  2144.             move.l              #$00040001,-(sp)
  2145.             moveq               #0,D0
  2146.             dc.w                $A82A
  2147.         EndM
  2148.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  2149.         IMPORT_CFM_FUNCTION SndInputReadAsync
  2150.     ENDIF
  2151.  
  2152. ;
  2153. ; pascal ComponentResult SndInputReadSync(ComponentInstance self, SndInputCmpParamPtr SICParmPtr)
  2154. ;
  2155.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  2156.         Macro
  2157.         _SndInputReadSync
  2158.             move.l              #$00040002,-(sp)
  2159.             moveq               #0,D0
  2160.             dc.w                $A82A
  2161.         EndM
  2162.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  2163.         IMPORT_CFM_FUNCTION SndInputReadSync
  2164.     ENDIF
  2165.  
  2166. ;
  2167. ; pascal ComponentResult SndInputPauseRecording(ComponentInstance self)
  2168. ;
  2169.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  2170.         Macro
  2171.         _SndInputPauseRecording
  2172.             move.l              #$00000003,-(sp)
  2173.             moveq               #0,D0
  2174.             dc.w                $A82A
  2175.         EndM
  2176.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  2177.         IMPORT_CFM_FUNCTION SndInputPauseRecording
  2178.     ENDIF
  2179.  
  2180. ;
  2181. ; pascal ComponentResult SndInputResumeRecording(ComponentInstance self)
  2182. ;
  2183.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  2184.         Macro
  2185.         _SndInputResumeRecording
  2186.             move.l              #$00000004,-(sp)
  2187.             moveq               #0,D0
  2188.             dc.w                $A82A
  2189.         EndM
  2190.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  2191.         IMPORT_CFM_FUNCTION SndInputResumeRecording
  2192.     ENDIF
  2193.  
  2194. ;
  2195. ; pascal ComponentResult SndInputStopRecording(ComponentInstance self)
  2196. ;
  2197.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  2198.         Macro
  2199.         _SndInputStopRecording
  2200.             move.l              #$00000005,-(sp)
  2201.             moveq               #0,D0
  2202.             dc.w                $A82A
  2203.         EndM
  2204.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  2205.         IMPORT_CFM_FUNCTION SndInputStopRecording
  2206.     ENDIF
  2207.  
  2208. ;
  2209. ; pascal ComponentResult SndInputGetStatus(ComponentInstance self, short *recordingStatus, unsigned long *totalSamplesToRecord, unsigned long *numberOfSamplesRecorded)
  2210. ;
  2211.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  2212.         Macro
  2213.         _SndInputGetStatus
  2214.             move.l              #$000C0006,-(sp)
  2215.             moveq               #0,D0
  2216.             dc.w                $A82A
  2217.         EndM
  2218.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  2219.         IMPORT_CFM_FUNCTION SndInputGetStatus
  2220.     ENDIF
  2221.  
  2222. ;
  2223. ; pascal ComponentResult SndInputGetDeviceInfo(ComponentInstance self, OSType infoType, void *infoData)
  2224. ;
  2225.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  2226.         Macro
  2227.         _SndInputGetDeviceInfo
  2228.             move.l              #$00080007,-(sp)
  2229.             moveq               #0,D0
  2230.             dc.w                $A82A
  2231.         EndM
  2232.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  2233.         IMPORT_CFM_FUNCTION SndInputGetDeviceInfo
  2234.     ENDIF
  2235.  
  2236. ;
  2237. ; pascal ComponentResult SndInputSetDeviceInfo(ComponentInstance self, OSType infoType, void *infoData)
  2238. ;
  2239.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  2240.         Macro
  2241.         _SndInputSetDeviceInfo
  2242.             move.l              #$00080008,-(sp)
  2243.             moveq               #0,D0
  2244.             dc.w                $A82A
  2245.         EndM
  2246.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  2247.         IMPORT_CFM_FUNCTION SndInputSetDeviceInfo
  2248.     ENDIF
  2249.  
  2250. ;
  2251. ; pascal ComponentResult SndInputInitHardware(ComponentInstance self)
  2252. ;
  2253.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  2254.         Macro
  2255.         _SndInputInitHardware
  2256.             move.l              #$00000009,-(sp)
  2257.             moveq               #0,D0
  2258.             dc.w                $A82A
  2259.         EndM
  2260.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  2261.         IMPORT_CFM_FUNCTION SndInputInitHardware
  2262.     ENDIF
  2263.  
  2264.     ENDIF
  2265.  
  2266.     ENDIF ; __SOUND__ 
  2267.  
  2268.